From e39b5c1121f28e6c2cfa89530065bb3cb0d4fd24 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 21 Mar 2019 08:44:53 -0700 Subject: [PATCH] Clarify some introductory docs * Note that after the game of life tutorial there's also wasm-pack tutorials * Ensure that the hello world example is clear that webpack isn't required inline in addition to the text on other pages. --- guide/src/examples/hello-world.md | 5 +++++ guide/src/examples/index.md | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/guide/src/examples/hello-world.md b/guide/src/examples/hello-world.md index 2efc9256b..044954cff 100644 --- a/guide/src/examples/hello-world.md +++ b/guide/src/examples/hello-world.md @@ -40,6 +40,11 @@ Our JS entry point is quite small! ## Webpack-specific files +> **Note**: Webpack is not required for this example, and if you're interested +> in options that don't use a JS bundler [see other examples][wab]. + +[wab]: without-a-bundler.html + And finally here's the Webpack configuration and `package.json` for this project: diff --git a/guide/src/examples/index.md b/guide/src/examples/index.md index e83f7c61a..30f5f42b3 100644 --- a/guide/src/examples/index.md +++ b/guide/src/examples/index.md @@ -6,12 +6,13 @@ doing. These examples all assume familiarity with `wasm-bindgen`, `wasm-pack`, and building a Rust and WebAssembly project. If you're unfamiliar with these check -out the [Game of Life tutorial][gol] to help you get started. +out the [Game of Life tutorial][gol] or [wasm pack tutorials][wpt] to help you +get started. The source code for all examples can also be [found online][code] to download and 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. +accompanied with instructions or 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 review the [deployment @@ -20,3 +21,4 @@ documentation][deploy] for other options of how to deploy Rust and WebAssembly. [code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples [gol]: https://rustwasm.github.io/docs/book/ [deploy]: ../reference/deployment.html +[wpt]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html