wallet-core/packages/anastasis-webui/clean_and_build.sh

26 lines
789 B
Bash
Raw Normal View History

2022-06-06 05:07:10 +02:00
#!/usr/bin/env bash
2022-06-03 21:05:39 +02:00
echo clean
rm -rf dist
mkdir -p dist/fonts
cp \
src/scss/fonts/XRXV3I6Li01BKofINeaE.ttf \
src/scss/fonts/materialdesignicons-webfont-4.9.95.ttf \
src/scss/fonts/materialdesignicons-webfont-4.9.95.woff \
src/scss/fonts/materialdesignicons-webfont-4.9.95.woff2 \
dist/fonts
echo css
pnpm exec sass -I . ./src/scss/main.scss dist/main.css &
echo js
2022-06-06 04:10:51 +02:00
pnpm exec esbuild --log-level=error --bundle src/main.ts --outdir=dist --target=es6 --loader:.svg=dataurl --format=iife --sourcemap --jsx-factory=h --jsx-fragment=Fragment --platform=browser &
2022-06-03 21:05:39 +02:00
wait -n
wait -n
echo html
cat ui.html \
| sed -e '/ANASTASIS_SCRIPT_CONTENT/ {' -e 'r dist/main.js' -e 'd' -e '}' \
| sed -e '/ANASTASIS_STYLE_CONTENT/ {' -e 'r dist/main.css' -e 'd' -e '}' \
>dist/index.html
echo done