#!/bin/bash
set -e
# Add base url to be able to serve static files
if [ -n "$1" ]; then
echo '' >> .storybook/manager-head.html
else
echo '' >> .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