2021-10-26 02:45:39 +03:00
|
|
|
#!/bin/bash
|
2022-04-20 02:26:47 +03:00
|
|
|
set -e
|
2021-10-26 02:45:39 +03:00
|
|
|
# Add base url to be able to serve static files
|
2022-04-20 02:26:47 +03:00
|
|
|
if [ -n "$1" ]; then
|
|
|
|
echo '<base href="/storybook/" />' >> .storybook/manager-head.html
|
|
|
|
else
|
|
|
|
echo '<base href="/css/storybook/" />' >> .storybook/manager-head.html
|
|
|
|
fi
|
2021-10-26 02:45:39 +03:00
|
|
|
|
|
|
|
# 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
|