Permalink
Browse files

Include grunt-jasmine-task to run specs as part of the build process.

  • Loading branch information...
1 parent 29f7ffa commit 085e33ce3cacfd1784517aa5d805b3d3b0fab9d3 @mikeric committed Aug 4, 2012
Showing with 8 additions and 2 deletions.
  1. +7 −2 grunt.js
  2. +1 −0 package.json
View
@@ -8,6 +8,9 @@ module.exports = function(grunt) {
'// author: <%= pkg.author %>\n' +
'// license: <%= pkg.licenses[0].type %>'
},
+ jasmine: {
+ all: ['spec/index.html']
+ },
lint: {
files: ['grunt.js', 'lib/**/*.js', 'spec/**/*.js']
},
@@ -19,11 +22,11 @@ module.exports = function(grunt) {
},
watch: {
files: 'src/rivets.coffee',
- tasks: 'build'
+ tasks: 'build spec'
},
});
- grunt.registerTask('default', 'watch');
+ grunt.loadNpmTasks('grunt-jasmine-task');
grunt.registerTask('compile', 'Compiles CoffeeScript source into JavaScript.', function(){
var coffee = require('coffee-script');
@@ -32,5 +35,7 @@ module.exports = function(grunt) {
if (js) grunt.file.write('lib/rivets.js', banner + js);
});
+ grunt.registerTask('default', 'watch');
+ grunt.registerTask('spec', 'jasmine');
grunt.registerTask('build', 'compile min');
};
View
@@ -15,6 +15,7 @@
},
"devDependencies" : {
"grunt" : "0.3.x",
+ "grunt-jasmine-task" : "0.2.x",
"coffee-script" : "1.3.x"
}
}

0 comments on commit 085e33c

Please sign in to comment.