readd public-url flag

This commit is contained in:
Pieter Vander Vennet 2021-12-22 14:10:44 +01:00 committed by GitHub
parent 630bcd8dad
commit 6517741f70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ cp -r assets/themes/ dist/assets/themes/
cp -r assets/svg/ dist/assets/svg/
echo "\n\n Building non-theme pages"
echo " ==========================\n\n"
parcel build --no-source-maps "index.html" "404.html" "professional.html" "automaton.html" "land.html" "customGenerator.html" "theme.html" vendor
parcel build --public-url './' --no-source-maps "index.html" "404.html" "professional.html" "automaton.html" "land.html" "customGenerator.html" "theme.html" vendor
echo "\n\n Building theme pages"
echo " ======================\n\n"
@ -25,8 +25,8 @@ do
echo " ------------ \n\n"
# Builds the necessary files for just one theme, e.g. 'bookcases.html' + 'index_bookcases.ts' + supporting file
# npm run generate && node --max_old_space_size=12000 $(which parcel) build
parcel build --no-source-maps "$theme.html"
parcel build --public-url './' --no-source-maps "$theme.html"
done
# Optimize images
cd dist/ && find -name '*.png' -exec optipng '{}' \; && echo 'PNGs are optimized'
cd dist/ && find -name '*.png' -exec optipng '{}' \; && echo 'PNGs are optimized'