bitque/jirs-client/scripts/prod.sh

17 lines
448 B
Bash
Raw Normal View History

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