From dc1d31fc26ea574e963101caad921a0d3338caac Mon Sep 17 00:00:00 2001 From: Manuel Mujica Date: Mon, 15 May 2017 08:32:25 -0600 Subject: [PATCH] Fix steal-tools bundle docs Remove references to `deps-bundle-dest` and `dev-bundle-dest`; the attributes `dev-bundle` and `deps-bundle` can be passed a string to the path where the dev-bundle module is located. Close stealjs/steal#1197 --- doc/bundle.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/bundle.md b/doc/bundle.md index 71071171..389c0631 100644 --- a/doc/bundle.md +++ b/doc/bundle.md @@ -8,10 +8,10 @@ can be provided to filter out module during the build. @param {steal-tools.StealConfig} config Specifies configuration values to set on Steal's loader. - + @param {steal-tools.BuildOptions} [options] Specifies the behavior of the build. - + @return {Promise} A Promise that resolves when the build is complete. @body @@ -60,7 +60,7 @@ It can be a string with a single pattern or an array if multiple patterns are ne }, { filter: "node_modules/**/*" }); - + The `filter` value used in the example above will create a bundle of the modules loaded by the application which are located in the `node_modules` folder. @@ -75,7 +75,7 @@ The `dest` option specifies **a folder** where the bundles are written out. dest: path.join(__dirname, "my-bundle"), filter: "node_modules/**/*" }); - + This will build bundles like: @@ -86,7 +86,8 @@ This will build bundles like: To load the bundles, a html page should have a script tag like: ``` - + ``` ## Dependencies bundle and development bundles @@ -123,7 +124,8 @@ We call a **development bundle** a **dependencies bundle** that also includes th Unlike a **dependencies bundle**, a **development bundle** has to be loaded before [StealJS configMain](StealJS.config.configMain) is loaded. In order to do that, StealJS provides a `dev-bundle` propert that you can set to the script tag so it loads the bundle correctly, like this: ``` - + ``` You will get faster load times with **development bundles**, with the downside that you will need to generate the bundle each time your config module changes or your application might no load at all.