1
1
mirror of https://github.com/primer/css.git synced 2024-12-24 14:42:26 +03:00
css/docs/script/build-storybook

15 lines
442 B
Plaintext
Raw Normal View History

#!/bin/bash
set -e
# Add base url to be able to serve static files
if [ -n "$1" ]; then
echo '<base href="/storybook/" />' >> .storybook/manager-head.html
else
echo '<base href="/css/storybook/" />' >> .storybook/manager-head.html
fi
# Build storybook inside docs
./node_modules/.bin/build-storybook -o public/storybook -s public/static
# Remove manager-head after build to not interfere with dev builds
rm .storybook/manager-head.html