Reputation: 191
I am using 'cssmin' and 'sass' grunt task separately, Is it possible to run them one after other automatically, when I can anything in my file.
cssmin: {
target: {
files: [{
cwd: srcCss,
src: ['**/*.css', '*.css'],
dest: buildCss
}]
}
},
sass: {
target: {
files: [{
cwd: srcScss,
src: ['**/*.scss', '*.scss'],
dest: srcCss
}]
}
}
Upvotes: 1
Views: 32
Reputation: 834
This can be done easily: You need to use watch plugin,
3.
grunt.initConfig({
watch: {
scripts: {
files: ['lib/*.js'],
tasks: ['jshint'],
options: {
spawn: false,
},
},
},
jshint: {
all: {
src: ['lib/*.js'],
},
},
});
// Default task(s).
grunt.registerTask('default', 'watch');
Upvotes: 1