Skip to content

Commit

Permalink
doc(bundling): add code listing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedshuhel committed May 10, 2016
1 parent 5458c56 commit 9c863c7
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions doc/article/en-US/bundling-your-app-for-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,30 +127,33 @@ We can create just a single bundle, if we want, that combines both application c

In a JSPM v0.17 style app, we have two separate config files: `jspm.browser.js` and `jspm.config.js`. In such case the `configPath` in the bundle config should look like: `configPath: ['./jspm.browser.js', './jspm.config.js']`. We also have to add another `injectionConfigPath` to indicate which config file should host the bundle and depCache injection. Here is a typical bundle configuration for a `JSPM v0.17` app.

```javascript
var config = {
force: true,
baseURL: '.', // baseURL of the application
configPath: [ // SystemJS/JSPM configuration files
'./jspm.browser.js',
'./jspm.config.js'
],
injectionConfigPath: './jspm.config.js' // Configuration file path where bundle and depCache meta will be injected.
bundles: {
"dist/app-build": { // bundle name/path. Must be within `baseURL`. Output path will look like: `baseURL/dist/app-build.js`.
includes: [
'[*.js]',
'*.html!text',
'*.css!text',
],
options: {
inject: true,
minify: true
<code-listing heading="bundle.js">
<source-code lang="JavaScript">

var config = {
force: true,
baseURL: '.', // baseURL of the application
configPath: [ // SystemJS/JSPM configuration files
'./jspm.browser.js',
'./jspm.config.js'
],
injectionConfigPath: './jspm.config.js' // Configuration file path where bundle and depCache meta will be injected.
bundles: {
"dist/app-build": { // bundle name/path. Must be within `baseURL`. Output path will look like: `baseURL/dist/app-build.js`.
includes: [
'[*.js]',
'*.html!text',
'*.css!text',
],
options: {
inject: true,
minify: true
}
}
}
}
}
}
```
</source-code>
</code-listing>

## [Duplicate Modules in Multiple Bundles](aurelia-doc://section/5/version/1.0.0)

Expand Down

0 comments on commit 9c863c7

Please sign in to comment.