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
SEPTEMBER 2018
You don't need to use grunt-concurrent anymore grunt now has this built in, here is a sample from one of my current projects...
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
theme: {
files: {
'../../web/sites/all/themes/ifafri/css/generated/theme_ifafri_master.css' : '../../web/sites/all/themes/ifafri/css/master.scss'
}
},
bootstrap: {
files: {
'../../web/sites/all/themes/ifafri/css/generated/theme_ifafri_bootstrap.css' : '../../web/sites/all/themes/ifafri/css/bootstrap/master.scss'
}
}
},
watch: {
theme: {
files: '../../web/sites/all/themes/ifafri/css/*.scss',
tasks: ['sass:theme'],
options: {
spawn: false,
livereload: true,
nospawn: false
}
},
bootstrap: {
files: '../../web/sites/all/themes/ifafri/css/bootstrap/*.scss',
tasks: ['sass:bootstrap'],
options: {
spawn: false,
livereload: true,
nospawn: false
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-livereload');
grunt.registerTask('default',['watch']);
}