I'm after this object: https://github.com/gruntjs/grunt-contrib-watch/blob/master/tasks/watch.js#L33
so I can pass that string into this subtask (I'm using grunt-shell and write-good):
grunt.initConfig({
shell: {
checkAll: {
command: 'write-good *.md --no-passive',
options: {
//callback: checkForErrors
}
},
checkSpecified: {
command: 'write-good <%= filepath %> --no-passive',
options: {
//callback: checkForErrors
}
}
},
watch: {
docs: {
files: '**/*.md',
tasks: ['shell:checkSpecified'],
options: {
livereload: true
}
}
}
});
grunt.registerTask('default', "Checking for good prose, excluding passive voice.", function(){
grunt.task.run('shell:checkAll', 'watch');
});
Hoping the Grunt maintainers will see this relatively crude idea and give me a hand :) I'm on OS X 10.9.4, please let me know if I can provide any other relevant info.