Is it possible to run two watch tasks simultaneously?
I understand that I can have any number of tasks I want inside watch settings and just launch grun
Concurrent works fine for me
concurrent: {
options: {
logConcurrentOutput: true
},
set1: ['watch:html', 'watch:styles'],
},
grunt.registerTask('default', 'watch');
grunt.registerTask('htmlcss', ['concurrent:set1']);
Without worrying grunt.registerTask() in Gruntfile.js, I sometimes run grunt as background processes by typing the following in the command line:
$ grunt watch:A &
$ grunt watch:C &
You can make the commands as a batch script for more convenience. Hopefully it helps.
I've found using grunt-concurrent works:
concurrent: {
options: {
logConcurrentOutput: true
},
prod: {
tasks: ["watch:A", "watch:C"]
},
dev: {
tasks: ["watch:B", "watch:C"]
}
}
Then:
grunt.registerTask("prod", ["concurrent:prod"]);
grunt.registerTask("dev", ["concurrent:dev"]);