Convert all examples to using wasm-pack

This commit migrates all our examples to using `wasm-pack build` to
compile their code and run `wasm-bindgen`. This should make it a bit
easier to understand the examples as there's less to follow during the
build step.

Webpack projects are all using `@wasm-tool/wasm-pack-plugin` as well so
the build step is simple `npm run serve`. Other examples which retain
`build.sh` are just using `wasm-pack build` now
This commit is contained in:
Alex Crichton
2019-01-08 15:14:15 -08:00
parent d79ca22234
commit 32c611d16d
126 changed files with 180 additions and 481 deletions

View File

@ -5,8 +5,9 @@ This subsection contains examples of using the `wasm-bindgen`, `js-sys`, and
doing.
The source code for all examples can also be [found online][code] to download an
run locally. Each example is accompanied with a `build.sh` script to outline the
steps necessary to build and run it as well.
run locally. Most examples are configured with Webpack/`wasm-pack` and can
be built with `npm run serve`. Other examples which don't use Webpack are
accompanied with a `build.sh` showing how to build it.
Note that most examples currently use Webpack to assemble the final output
artifact, but this is not required! You can use the bundler of choice,