Just specify all necessary watch tasks in concurrent
:
tasks : ['nodemon', 'watch:js', 'watch:html', 'watch:css']
Domanda
I have the following watch configuration that reloads the page and run others tasks.
watch: {
js: {
files: ['gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**', 'test/**/*.js'],
tasks: ['jshint'],
options: {
livereload: true,
},
},
html: {
files: ['public/views/**', 'app/views/**'],
options: {
livereload: true,
},
},
css: {
files: ['public/css/**'],
options: {
livereload: true
}
},
test: {
files: ['app/**/*.js', 'test/mocha/**/*.js'],
tasks: ['mochaTest', 'karma:unit']
}
},
I don't want to run the "test" option inside watch task, I just want to run it when I specify that, like in my test task:
grunt.registerTask('test-w', ['mochaTest', 'karma:unit', 'watch:test']);
I've tried to do this inside concurrent task:
tasks: ['nodemon', 'watch:js:html:css']
Didn't work unfortunetly :(
Soluzione
Just specify all necessary watch tasks in concurrent
:
tasks : ['nodemon', 'watch:js', 'watch:html', 'watch:css']