Skip to content

Commit

Permalink
feat(app generator): include tests on debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cueedee committed Aug 26, 2016
1 parent a11115d commit ca4d091
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ Grunt can do more than just that; here's a recap of common grunt idioms:

command | description
:-- |:--
`grunt [default]` | does a for-production, non-debugging, all-parts, minified build plus artifacts;
`grunt debug` | does a for-testing, debugging, all-parts except documentation, as-is build;
`grunt [default]` | does a for-production, non-debugging, all-parts, tested, minified build plus artifacts;
`grunt debug` | does a for-testing, debugging, all-parts except documentation, tested, as-is build;
`grunt dev` | does a for-local, debugging, all-parts except documentation, as-is build; <br>_(**Note that this variant doesn't exit**. Instead it'll keep a close watch on filesystem changes, selectively re-triggering part builds as needed)_
`grunt doc` | will build just the code documentation;
`grunt lint` | will just lint your code;
Expand All @@ -182,13 +182,13 @@ command | description

BAT comes with support for unit testing using [Mocha](http://mochajs.org/) and [Chai](http://chaijs.com/). The demo webapp has a basic (and admittedly, pretty unconnected) example of this.

You may already have guessed how to run your test suite; it's:
You may already have guessed how to independently run your test suite; it's:

```shell
grunt test
```

The default grunt task also includes the `test` task. You may or may not want to add it to your `dev` task too, depending on your workflow.
The default and `debug` grunt tasks also include the `test` task. You may or may not want to add it to your `dev` task too, depending on your workflow.


## ChangeLog
Expand Down
4 changes: 2 additions & 2 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,10 @@ var AppGenerator = generators.Base.extend(

+ '\n'
+ chalk.bold( ' * ' + chalk.yellow( 'grunt ' + chalk.cyan( '[' ) + 'default' + chalk.cyan( ']' ) + ' ' ))
+ '- does a for-production, non-debugging, all-parts, minified build plus artifacts;\n'
+ '- does a for-production, non-debugging, all-parts, tested, minified build plus artifacts;\n'

+ chalk.bold( ' * ' + chalk.yellow( 'grunt debug ' ))
+ '- does a for-testing, debugging, all-parts except documentation, as-is build;\n'
+ '- does a for-testing, debugging, all-parts except documentation, tested, as-is build;\n'

+ chalk.bold( ' * ' + chalk.yellow( 'grunt dev ' ))
+ '- does a for-local, debugging, all-parts except documentation, as-is build;\n'
Expand Down
6 changes: 4 additions & 2 deletions generators/app/templates/@Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
##
## Finally, this is how the main grunt commandline tasks are mapped to all of the above:
##
## * grunt [default] - does a for-production, non-debugging, all-parts, minified build plus artifacts;
## * grunt debug - does a for-testing, debugging, all-parts except documentation, as-is build;
## * grunt [default] - does a for-production, non-debugging, all-parts, tested, minified build plus artifacts;
## * grunt debug - does a for-testing, debugging, all-parts except documentation, tested, as-is build;
## * grunt dev - does a for-local, debugging, all-parts except documentation, as-is build;
## (Note that this variant doesn't exit. Instead, it'll keep a close watch on
## filesystem changes, selectively re-triggering part builds as needed)
Expand Down Expand Up @@ -933,6 +933,8 @@ module.exports = ( grunt ) ->

'app:debug'

'test'

'compress:app_debug'
]
)
Expand Down
4 changes: 2 additions & 2 deletions generators/app/templates/@README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ If you would like something different, here's a recap of most common grunt idiom

command | description
:-- |:--
`grunt [default]` | does a for-production, non-debugging, all-parts, minified build plus artifacts;
`grunt debug` | does a for-testing, debugging, all-parts except documentation, as-is build;
`grunt [default]` | does a for-production, non-debugging, all-parts, tested, minified build plus artifacts;
`grunt debug` | does a for-testing, debugging, all-parts except documentation, tested, as-is build;
`grunt dev` | does a for-local, debugging, all-parts except documentation, as-is build; <br>_(**Note that this variant doesn't exit**. Instead it'll keep a close watch on filesystem changes, selectively re-triggering part builds as needed)_
`grunt doc` | will build just the code documentation;
`grunt lint` | will just lint your code;
Expand Down

0 comments on commit ca4d091

Please sign in to comment.