yewprint/build.sh

21 lines
468 B
Bash
Raw Normal View History

2020-09-03 14:45:38 +00:00
#!/bin/bash
if [ ${#@} == 0 ]; then
options=(--release)
else
options=()
fi
2020-09-03 15:14:16 +00:00
if ! [ -f core.tgz ]; then
curl -o core.tgz https://registry.npmjs.org/@blueprintjs/core/-/core-3.30.0.tgz
fi
2020-09-13 05:53:12 +00:00
mkdir -p static
2020-09-03 14:45:38 +00:00
rm -fR static/.gitignore static/*
2020-09-03 15:14:16 +00:00
tar xvzf core.tgz -C static --wildcards \*.css --transform='s/.*\///'
2020-09-03 14:45:38 +00:00
wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./static "${options[@]}" "$@"
rc=$?
rm -fR static/{.gitignore,package.json}
exit $rc