diff --git a/build.sh b/build.sh index 9183b50..253af13 100755 --- a/build.sh +++ b/build.sh @@ -10,19 +10,13 @@ if ! [ -f core.tgz ]; then curl -o core.tgz https://registry.npmjs.org/@blueprintjs/core/-/core-3.30.0.tgz fi +# cleanup mkdir -p static - rm -fR static/.gitignore static/* -# decompress the tar file but extract the `.css` files only -# find every file in the nested directories and move it behind `./static` -# finally remove every directory behind `./static` -bsdtar xvzf core.tgz -C static \*.css && - find ./static -mindepth 2 -type f -print -exec mv {} ./static \; && - find ./static -mindepth 1 -type d -print -exec rm -rf {} \; - +# build +bsdtar xOf core.tgz package/lib/css/blueprint.css > static/blueprint.css wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./static "${options[@]}" "$@" - rc=$? rm -fR static/{.gitignore,package.json}