mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 11:33:04 +00:00
29 lines
573 B
Bash
Executable file
29 lines
573 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ ${#@} == 0 ]; then
|
|
options=(--release)
|
|
else
|
|
options=()
|
|
fi
|
|
|
|
if ! [ -f core.tgz ]; then
|
|
curl -o core.tgz https://registry.npmjs.org/@blueprintjs/core/-/core-3.30.0.tgz
|
|
fi
|
|
|
|
# cleanup
|
|
mkdir -p public
|
|
rm -fR public/.gitignore public/*
|
|
|
|
# copy index.html
|
|
cp static/index.html public/
|
|
|
|
# download blueprint css
|
|
tar xzOf core.tgz package/lib/css/blueprint.css > public/blueprint.css
|
|
|
|
# build
|
|
wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./public "${options[@]}" "$@"
|
|
rc=$?
|
|
|
|
rm -fR public/{.gitignore,package.json,README.md}
|
|
|
|
exit $rc
|