mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-14 02:55:47 -04:00
chore(crypto-js): Add npm run pack.
This patch introduces a new `pack` NPM script, which runs `wasm-pack pack` behind the scene. This patch modifies the `publish` NPM script to run the `pack` script as a pre-script (so… in the `prepublish` script). Finally, this patch no longer uses `$npm_execpath` as it doesn't work on Windows. It should be `%npm_execpath%`. It's not obvious to make scripts interoperable, so we will stick with `npm` for now.
This commit is contained in:
@@ -39,7 +39,9 @@
|
||||
"build": "cross-env RUSTFLAGS='-C opt-level=z' wasm-pack build --release --target nodejs --scope matrix-org --out-dir ./pkg",
|
||||
"test": "jest --verbose",
|
||||
"doc": "typedoc --tsconfig .",
|
||||
"prepublish": "$npm_execpath run build && $npm_execpath run test",
|
||||
"publish": "wasm-pack pack && wasm-pack publish"
|
||||
"prepack": "npm run build && npm run test",
|
||||
"pack": "wasm-pack pack",
|
||||
"prepublish": "npm run pack",
|
||||
"publish": "wasm-pack publish"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user