2012-11-02 13:03:09 +08:00
|
|
|
## Basic Use
|
2012-11-02 13:03:09 +08:00
|
|
|
|
|
|
|
Sample configuration to run Pivotal Labs' example Jasmine application.
|
|
|
|
|
|
|
|
```js
|
2012-12-03 16:17:06 +08:00
|
|
|
// Example configuration
|
|
|
|
grunt.initConfig({
|
|
|
|
jasmine: {
|
|
|
|
pivotal: {
|
|
|
|
src: 'src/**/*.js'
|
|
|
|
options: {
|
|
|
|
specs: 'spec/*Spec.js',
|
|
|
|
helpers: 'spec/*Helper.js'
|
|
|
|
}
|
2012-11-02 13:03:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Supplying a custom template
|
|
|
|
|
|
|
|
Supplying a custom template to the above example
|
|
|
|
|
|
|
|
```js
|
2012-12-03 16:17:06 +08:00
|
|
|
// Example configuration
|
|
|
|
grunt.initConfig({
|
|
|
|
jasmine: {
|
|
|
|
customTemplate: {
|
|
|
|
src: 'src/**/*.js',
|
|
|
|
options: {
|
|
|
|
specs: 'spec/*Spec.js',
|
|
|
|
helpers: 'spec/*Helper.js'
|
|
|
|
template: 'custom.tmpl'
|
|
|
|
}
|
2012-11-02 13:03:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2013-01-10 13:14:50 +08:00
|
|
|
## Sample RequireJS/NPM Template usage
|
2012-11-02 13:03:09 +08:00
|
|
|
|
2013-01-10 13:14:50 +08:00
|
|
|
```js
|
|
|
|
// Example configuration
|
|
|
|
grunt.initConfig({
|
|
|
|
jasmine: {
|
|
|
|
yourTask: {
|
|
|
|
src: 'src/**/*.js',
|
|
|
|
options: {
|
|
|
|
specs: 'spec/*Spec.js',
|
|
|
|
template: require('grunt-template-jasmine-requirejs')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
NPM Templates are just node modules, so you can write and treat them as such.
|
|
|
|
|
|
|
|
Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation
|
|
|
|
for more information on the RequireJS template.
|