Skip to content

Commit

Permalink
add watchfile task and jasmine task,but not tested!
Browse files Browse the repository at this point in the history
  • Loading branch information
yaowenqiang committed Oct 3, 2015
1 parent 296debb commit 83f0793
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Gruntfile.js
@@ -1,5 +1,7 @@
//npm install -g grunt-cli
//npm install --save-dev grunt-shell
//npm install --save-dev grunt-contrib-watch
//npm install --save-dev grunt-contrib-jasmine
//Usage: grunt shell
module.exports = function (grunt) {
grunt.initConfig({
Expand All @@ -9,9 +11,32 @@ module.exports = function (grunt) {
command: 'phantomjs system_api.js jacky.yao'
}
},
//configure jasmine task
//https://github.com/gruntjs/grunt-contrib-jasmine
jasmine: {
pivotal: {
sec: 'js/src/**/*.js',
optins: {
specs: 'js/spec/*Spec.js'
}
}
},
// configure file watcher
// https://github.com/gruntjs/grunt-contrib-watch
watch: {
scripts: {
files: [ 'js/src/**/*.js' ],
tasks: [ 'jasmine' ],
options: {
spawon: false,
}
}
}
//set up tasks
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.registerTask('default',['shell:phantomjs']);

};

0 comments on commit 83f0793

Please sign in to comment.