mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 03:23:03 +00:00
Simplify build.sh
This commit is contained in:
parent
4ef1cd5927
commit
12280a2aea
1 changed files with 3 additions and 9 deletions
12
build.sh
12
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
|
curl -o core.tgz https://registry.npmjs.org/@blueprintjs/core/-/core-3.30.0.tgz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# cleanup
|
||||||
mkdir -p static
|
mkdir -p static
|
||||||
|
|
||||||
rm -fR static/.gitignore static/*
|
rm -fR static/.gitignore static/*
|
||||||
|
|
||||||
# decompress the tar file but extract the `.css` files only
|
# build
|
||||||
# find every file in the nested directories and move it behind `./static`
|
bsdtar xOf core.tgz package/lib/css/blueprint.css > static/blueprint.css
|
||||||
# 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 {} \;
|
|
||||||
|
|
||||||
wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./static "${options[@]}" "$@"
|
wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./static "${options[@]}" "$@"
|
||||||
|
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
rm -fR static/{.gitignore,package.json}
|
rm -fR static/{.gitignore,package.json}
|
||||||
|
|
Loading…
Reference in a new issue