Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated for rc5

  • Loading branch information...
commit 82393b94bf21da3cc91737ec52d76b831217dca2 1 parent 7fd976a
@jsoverson jsoverson authored
View
4 CHANGELOG
@@ -1,6 +1,8 @@
-v0.3.0:
+v0.3.0rc5:
date: 2013-01-08
changes:
+ - Updating to work with grunt v0.4.0rc5.
+ - Switching to this.filesSrc api.
- Added JUnit xml output (via Kelvin Luck @vitch)
- Passing console.log from browser to verbose grunt logging
- Support for templates as separate node modules
View
2  Gruntfile.js
@@ -60,9 +60,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
- grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-internal');
- grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('watch-test', ['connect', 'watch']);
View
28 README.md
@@ -114,7 +114,7 @@ Specify a custom template used to generate your Spec Runner. Templates are parse
the expanded list of files needed to build a specrunner.
You can specify an object with a `process` method that will be called as a template function.
-See the [Template API Documentation](needs-wiki-link) for more details.
+See the [Template API Documentation](https://github.com/gruntjs/grunt-contrib-jasmine/wiki/Jasmine-Templates) for more details.
#### options.templateOptions
Type: `Object`
@@ -179,14 +179,32 @@ grunt.initConfig({
}
```
-#### Sample RequireJS usage
+#### Sample RequireJS/NPM Template usage
-Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs)
+```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.
## Release History
- * 2013-01-07   v0.3.0   Added JUnit xml output (via Kelvin Luck @vitch) Passing console.log from browser to verbose grunt logging Support for templates as separate node modules Removed internal requirejs template (see grunt-template-jasmine-requirejs)
+ * 2013-01-07   v0.3.0rc5   Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api. Added JUnit xml output (via Kelvin Luck @vitch) Passing console.log from browser to verbose grunt logging Support for templates as separate node modules Removed internal requirejs template (see grunt-template-jasmine-requirejs)
* 2012-12-02   v0.2.0   Generalized requirejs template config Added loader plugin Tests for templates Updated jasmine to 1.3.0
* 2012-11-23   v0.1.2   Updated for new grunt/grunt-contrib apis
* 2012-11-06   v0.1.1   Fixed race condition in requirejs template
@@ -196,4 +214,4 @@ Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/g
Task submitted by [Jarrod Overson](http://jarrodoverson.com)
-*This file was generated on Tue Jan 08 2013 11:28:08.*
+*This file was generated on Wed Jan 09 2013 21:19:35.*
View
22 docs/jasmine-examples.md
@@ -39,6 +39,24 @@ grunt.initConfig({
}
```
-## Sample RequireJS usage
+## Sample RequireJS/NPM Template usage
-Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs)
+```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.
View
2  docs/jasmine-options.md
@@ -68,7 +68,7 @@ Specify a custom template used to generate your Spec Runner. Templates are parse
the expanded list of files needed to build a specrunner.
You can specify an object with a `process` method that will be called as a template function.
-See the [Template API Documentation](needs-wiki-link) for more details.
+See the [Template API Documentation](https://github.com/gruntjs/grunt-contrib-jasmine/wiki/Jasmine-Templates) for more details.
## options.templateOptions
Type: `Object`
View
12 package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-contrib-jasmine",
"description": "Run jasmine specs headlessly through PhantomJS.",
- "version": "0.2.0",
+ "version": "0.3.0rc5",
"homepage": "https://github.com/gruntjs/grunt-contrib-jasmine",
"author": {
"name": "Grunt Team",
@@ -29,15 +29,13 @@
},
"dependencies": {
"grunt-lib-phantomjs": "~0.1.0",
- "grunt": "~0.4.0",
+ "grunt": "~0.4.0rc5",
"rimraf": "~2.0.3"
},
"devDependencies": {
- "grunt-contrib-internal": "~0.1.1",
- "grunt-contrib-connect": "~0.1.0",
- "grunt-contrib-nodeunit": "~0.1.1",
- "grunt-contrib-jshint": "~0.1.0",
- "grunt-contrib-watch": "~0.1.4"
+ "grunt-contrib-internal": "*",
+ "grunt-contrib-nodeunit": "~0.1.2rc5",
+ "grunt-contrib-jshint": "~0.1.1rc5"
},
"keywords": [
"gruntplugin",
View
10 tasks/jasmine.js
@@ -46,14 +46,20 @@ module.exports = function(grunt) {
junit: {}
});
+ if (options.template === 'requirejs') {
+ grunt.log.warn(
+ 'The requirejs template is no longer included in grunt-contrib-jasmine core.\n' +
+ 'Please see the https://github.com/gruntjs/grunt-contrib-jasmine README for details'
+ );
+ }
+
if (grunt.option('debug')) {
grunt.log.debug(options);
}
setup(options);
- var files = this.file.src;
- jasmine.buildSpecrunner(files,options);
+ jasmine.buildSpecrunner(this.filesSrc,options);
// If we're just building (e.g. for web), skip phantom.
if (this.flags.build) return;
View
2  tasks/lib/jasmine.js
@@ -90,7 +90,7 @@ exports.init = function(grunt) {
var base = path.resolve(baseDir);
var files = [];
list.forEach(function(listItem){
- if (listItem) files = files.concat(grunt.file.expandFiles(listItem));
+ if (listItem) files = files.concat(grunt.file.expand({filter: 'isFile'},listItem));
});
files = grunt.util._(files).map(function(file){
return path.resolve(file).replace(base,'.').replace(/\\/g,'/');
Please sign in to comment.
Something went wrong with that request. Please try again.