Don't reapply wasm-bindgen/wasm-opt if no changes
This commit is contained in:
parent
df1b2f7bdc
commit
c1ccf54501
@ -9,6 +9,7 @@ else
|
|||||||
cargo build --lib --target wasm32-unknown-unknown --$PROFILE || exit 1
|
cargo build --lib --target wasm32-unknown-unknown --$PROFILE || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ target/wasm32-unknown-unknown/$PROFILE/opentally.wasm -nt html/opentally_async.wasm ]; then
|
||||||
# Apply wasm-bindgen
|
# Apply wasm-bindgen
|
||||||
wasm-bindgen --target no-modules target/wasm32-unknown-unknown/$PROFILE/opentally.wasm --out-dir html --no-typescript
|
wasm-bindgen --target no-modules target/wasm32-unknown-unknown/$PROFILE/opentally.wasm --out-dir html --no-typescript
|
||||||
|
|
||||||
@ -17,3 +18,4 @@ MANGLED=$(wasm-dis html/opentally_bg.wasm | grep '(import "wbg" "__wbg_getuserin
|
|||||||
wasm-opt -O2 --asyncify --pass-arg asyncify-imports@wbg.$MANGLED html/opentally_bg.wasm -o html/opentally_async.wasm
|
wasm-opt -O2 --asyncify --pass-arg asyncify-imports@wbg.$MANGLED html/opentally_bg.wasm -o html/opentally_async.wasm
|
||||||
|
|
||||||
rm html/opentally_bg.wasm
|
rm html/opentally_bg.wasm
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user