Skip to content

Commit bd7dbce

Browse files
Merge pull request #613 from AStoker/cli-docs
docs(aurelia-cli): describe build flags for revision numbers
2 parents 3042cdf + bbbab77 commit bd7dbce

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/article/en-US/the-aurelia-cli.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ To create builds with revision numbers, you must set `rev` to be `true` under th
7777
"rev": true
7878
}
7979
```
80+
You are also able to set specific flags so that build revisions only take place while staging or in production. For example:
81+
```javascript
82+
"options": {
83+
"minify": "stage & prod",
84+
"sourcemaps": "dev & stage",
85+
"rev": "stage & prod"
86+
}
87+
```
88+
Now, if you were to run `au build --env prod`, the output would contain build revisions, while `au build --env dev` would not. Setting the build revisions to only compile while in production can help the development process, since it keeps your workspace clean of various build revisions.
89+
### Modifying The Index File
8090
In order for your `index.html` file to be updated to load up the correct revisioned bundle, you must ensure that the `"index"` property located in `build/targets` section is correctly pointing to the `index.html` (or starting page) for your project. For example:
8191
``` javascript
8292
"build": {

0 commit comments

Comments
 (0)