atlas/tools/ci/build-prod.sh
Hans5958 8d5f3c8bab Add build script
Download all the jsDelivr stuff, and use Parcel to compact it
2022-04-28 13:10:22 +00:00

16 lines
502 B
Bash

# This command should be run on CI/Netlify enviroment!
# If you really wanted to run it, run it on the root.
rm -rf dist-temp
rm -rf dist
cp -r web/ dist-temp/
cp tools/ci/postcss.config.js ./
cp tools/ci/package.json ./
npm i
python tools/ci/cdn-to-local.py
npx parcel build dist-temp/index.html dist-temp/**.html --dist-dir "dist" --no-source-maps --no-content-hash
mkdir dist/_img
cp -r dist-temp/_img/canvas/ dist/_img/canvas/
cp dist-temp/atlas.json dist
rm -rf dist-temp
rm -rf postcss.config.js