mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2025-01-07 13:43:03 +03:00
26 lines
494 B
Bash
Executable File
26 lines
494 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
cargo build --target wasm32-unknown-unknown
|
|
|
|
rm -rf pkg
|
|
mkdir pkg
|
|
cargo run -p wasm-bindgen-cli --bin wasm-bindgen -- \
|
|
../../target/wasm32-unknown-unknown/debug/typescript_tests.wasm \
|
|
--out-dir pkg \
|
|
--typescript
|
|
|
|
mkdir pkg/web
|
|
cargo run -p wasm-bindgen-cli --bin wasm-bindgen -- \
|
|
../../target/wasm32-unknown-unknown/debug/typescript_tests.wasm \
|
|
--out-dir pkg/web \
|
|
--target web \
|
|
--typescript
|
|
|
|
if [ ! -d node_modules ]; then
|
|
npm install
|
|
fi
|
|
|
|
npm run tsc
|