Fix macro-railroad build

This commit is contained in:
Folyd 2022-08-11 21:40:04 +08:00
parent 3f589e814b
commit 7c741b01e5
3 changed files with 6 additions and 3 deletions

View file

@ -12,4 +12,4 @@ manage:
@cd manage && cargo run
# Build macro-railroad wasm module and js
macro-railroad: extension/script/macro-railroad-wasm.js extension/wasm/macro-railroad.wasm
macro-railroad: extension/wasm/macro-railroad.wasm extension/script/macro-railroad-wasm.js

View file

@ -4,5 +4,8 @@ extension/script/macro-railroad-wasm.js: macro-railroad/pkg/macro-railroad.js
extension/wasm/macro-railroad.wasm: macro-railroad/pkg/macro-railroad.wasm
cp $< $@
macro-railroad/pkg/macro-railroad.wasm: macro-railroad/Cargo.lock macro-railroad/Cargo.toml macro-railroad/build.rs macro-railroad/src/lib.rs
cd macro-railroad && wasm-pack build -t no-modules --out-name macro-railroad && mv pkg/macro-railroad_bg.wasm pkg/macro-railroad.wasm
macro-railroad/pkg:
mkdir $@
macro-railroad/pkg/macro-railroad.wasm: macro-railroad/Cargo.lock macro-railroad/Cargo.toml macro-railroad/build.rs macro-railroad/src/lib.rs | macro-railroad/pkg
cd macro-railroad && wasm-pack build -t no-modules --no-typescript --out-name macro-railroad && cp pkg/macro-railroad_bg.wasm pkg/macro-railroad.wasm

Binary file not shown.