restructuring and better debug

This commit is contained in:
Simon Gardling
2022-02-28 10:04:22 -05:00
parent f5ce5b9f2f
commit 0520904e7e
6 changed files with 40 additions and 15 deletions

View File

@@ -1,6 +1,17 @@
#!/bin/bash
set -e
bash build.sh
if test "$1" == "" || test "$1" == "release"; then
bash build.sh
elif test "$1" == "debug"; then
wasm-pack build --target web --debug --no-typescript
rm -fr tmp | true #delete tmp folder if exists
mkdir tmp tmp/pkg
cp -r pkg/integral_site_bg.wasm pkg/integral_site.js tmp/pkg/
cp www/index.html www/style.css tmp/
sed -i 's/\.\.\/pkg/\.\/pkg/g' tmp/index.html
fi
basic-http-server tmp/