|
|
@ -5,6 +5,10 @@ interoperability and for publishing a package to npm. This involves compiling |
|
|
|
your code to wasm and generating a pkg folder. This pkg folder will contain the |
|
|
|
your code to wasm and generating a pkg folder. This pkg folder will contain the |
|
|
|
wasm binary, a JS wrapper file, your `README`, and a `package.json` file. |
|
|
|
wasm binary, a JS wrapper file, your `README`, and a `package.json` file. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The `pkg` directory is automatically `.gitignore`d by default, since it contains |
|
|
|
|
|
|
|
build artifacts which are not intended to be checked into version |
|
|
|
|
|
|
|
control.<sup>[0](#footnote-0)</sup> |
|
|
|
|
|
|
|
|
|
|
|
## Path |
|
|
|
## Path |
|
|
|
|
|
|
|
|
|
|
|
The `wasm-pack build` command can be given an optional path argument, e.g.: |
|
|
|
The `wasm-pack build` command can be given an optional path argument, e.g.: |
|
|
@ -85,3 +89,9 @@ wasm-pack build examples/js-hello-world --mode no-install |
|
|
|
|---------------|------------------------------------------------------------------------------------------| |
|
|
|
|---------------|------------------------------------------------------------------------------------------| |
|
|
|
| `no-install` | `wasm-pack init` implicitly and create wasm binding without installing `wasm-bindgen`. | |
|
|
|
| `no-install` | `wasm-pack init` implicitly and create wasm binding without installing `wasm-bindgen`. | |
|
|
|
| `normal` | do all the stuffs of `no-install` with installed `wasm-bindgen`. | |
|
|
|
| `normal` | do all the stuffs of `no-install` with installed `wasm-bindgen`. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<hr style="font-size: 1.5em; margin-top: 2.5em"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<sup id="footnote-0">0</sup> If you need to include additional assets in the pkg |
|
|
|
|
|
|
|
directory and your NPM package, we intend to have a solution for your use case |
|
|
|
|
|
|
|
soon. [↩](#wasm-pack-build) |
|
|
|