Fixup some documentation

This commit is contained in:
Alex Crichton 2019-03-05 12:32:40 -08:00
parent f3f3ebee3a
commit bdf98f3a11
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# Without a Bundler
# Without a Bundler Using `--no-modules`
[View documentation for this example online][dox]
@ -11,3 +11,11 @@ $ wasm-pack build --target no-modules
```
and then opening `index.html` in a browser should run the example!
Note that this example is in contrast to the [without a bundler][wab] example
which performs a similar purpose except it uses `--no-modules` instead of
`--browser`. The main difference here is how the shim JS and module are loaded,
where this example uses old-school `script` tags while `--browser` uses ES
modules.
[wab]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/without-a-bundler

View File

@ -7,7 +7,11 @@
You can build the example locally with:
```
$ ./build.sh
$ cargo build --target wasm32-unknown-unknown --release
$ cargo run -p wasm-bindgen-cli --bin wasm-bindgen -- \
../../target/wasm32-unknown-unknown/release/without_a_bundler.wasm \
--out-dir pkg \
--browser
```
and then opening `index.html` in a browser should run the example!