1.3 KiB
1.3 KiB
Example application usage
Basic Use
Sample configuration to run Pivotal Labs' example Jasmine application.
// Example configuration
grunt.initConfig({
jasmine: {
pivotal: {
src: 'src/**/*.js',
options: {
specs: 'spec/*Spec.js',
helpers: 'spec/*Helper.js'
}
}
}
});
Supplying a custom template
Supplying a custom template to the above example
// Example configuration
grunt.initConfig({
jasmine: {
customTemplate: {
src: 'src/**/*.js',
options: {
specs: 'spec/*Spec.js',
helpers: 'spec/*Helper.js',
template: 'custom.tmpl'
}
}
}
});
Sample RequireJS/NPM Template usage
// 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 documentation for more information on the RequireJS template.