Skip to content

Instantly share code, notes, and snippets.

@yurfuwa-chan
Created October 20, 2012 09:40
Show Gist options
  • Save yurfuwa-chan/3922800 to your computer and use it in GitHub Desktop.
Save yurfuwa-chan/3922800 to your computer and use it in GitHub Desktop.
gruntjs+jasmine-headless-webkit
//https://github.com/gruntjs/grunt/
module.exports = function(grunt){
grunt.initConfig({
//execタスクとしてjasmine-headless-webkitを追加。
exec:{
jasmine:{
command:"jasmine-headless-webkit",
stdout:true
}
},
watch:{
//watchして変更があったらexecを実行
files:['public/javascripts/Player.js','spec/javascripts/PlayerSpec.js'],
tasks:'exec'
}
})
//NVMによるnodeバージョン管理のため、gruntのpluginは相対(絶対でも可能?)でモジュールを指定する。
//その場合、実タスクjsが含まれる/tasksを指定する
//https://github.com/gruntjs/grunt/blob/master/docs/plugins.md
grunt.loadTasks('../../node_modules/grunt-exec/tasks');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment