bitque/web/scripts/run-wasm-pack.sh

23 lines
535 B
Bash
Raw Permalink Normal View History

2020-10-18 10:35:41 +02:00
#!/usr/bin/env bash
set -ex
. .env
rm -Rf tmp
mkdir -p tmp
mkdir -p target
2020-11-25 20:14:52 +01:00
cd ${CLIENT_ROOT}
wasm-pack --verbose build --mode ${MODE} ${BUILD_TYPE} --out-name jirs --out-dir ${CLIENT_ROOT}/build --target web
2020-10-18 10:35:41 +02:00
2020-11-25 20:14:52 +01:00
cd ${CLIENT_ROOT}
2021-10-08 16:31:34 +02:00
rm -Rf ${COPY_TO}/styles.css
rsass -t Expanded ${CLIENT_ROOT}/js/styles.css >${COPY_TO}/styles.css
2020-11-25 20:14:52 +01:00
2021-10-08 16:31:34 +02:00
cp -r ${CLIENT_ROOT}/static/* ${COPY_TO}
2020-10-18 10:35:41 +02:00
2021-10-08 16:31:34 +02:00
cat ${CLIENT_ROOT}/static/index.js &>${COPY_TO}/index.js
cp ${CLIENT_ROOT}/build/*.{js,wasm} ${COPY_TO}/
cp ${CLIENT_ROOT}/js/template.html ${COPY_TO}/index.html