bitque/jirs-client/scripts/run-wasm-pack.sh

23 lines
598 B
Bash
Raw 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}
rm -Rf ${CLIENT_ROOT}/build/styles.css
2021-04-15 22:32:05 +02:00
rsass -t Expanded ${PROJECT_ROOT}/jirs-client/js/styles.css >${CLIENT_ROOT}/tmp/styles.css
2020-11-25 20:14:52 +01:00
cp -r ${CLIENT_ROOT}/static/* ${CLIENT_ROOT}/tmp
2020-10-18 10:35:41 +02:00
2021-04-15 22:32:05 +02:00
cat ${CLIENT_ROOT}/static/index.js &>${CLIENT_ROOT}/tmp/index.js
2020-11-25 20:14:52 +01:00
cp ${CLIENT_ROOT}/build/*.{js,wasm} ${CLIENT_ROOT}/tmp/
cp ${CLIENT_ROOT}/js/template.html ${CLIENT_ROOT}/tmp/index.html