bitque/jirs-client/scripts/dev.sh

19 lines
464 B
Bash
Raw Normal View History

#!/usr/bin/env bash
. .env
rm -Rf tmp
2020-05-22 17:35:32 +02:00
mkdir -p tmp
mkdir -p target
wasm-pack build --mode force --dev --out-name jirs --out-dir ./tmp --target web -- --verbose
../target/debug/jirs-css -i ./js/styles.css -O ./tmp/styles.css
2020-05-19 20:54:46 +02:00
cp -r ./static/* ./tmp
cat ./static/index.js \
| sed -e "s/process.env.JIRS_SERVER_BIND/'$JIRS_SERVER_BIND'/g" \
| sed -e "s/process.env.JIRS_SERVER_PORT/'$JIRS_SERVER_PORT'/g" &> ./tmp/index.js
2020-05-19 20:54:46 +02:00
cp ./js/template.html ./tmp/index.html