The Grunt watch will only look at files, and then run the tasks you set. I assume that in your grunt file you will have something like this:
css: {
files: [
'bootstrap.css',
],
tasks: ['less'],
},
In a smaller task, you should have something like below. Note that the parameter is cleancssset to true:
options: {
cleancss: true
},
files: {
"dest/bootstrap.min.css": "src/bootstrap.css",
"dest/bootstrap.theme.min.css": "src/bootstrap.theme.css"
}
UPDATE:
Based on the file you uploaded, you should run the task cssmin:corewhen the clock fires.
UPDATE 2:
To update the view task, you can simply add the cssmin: core task to the smaller subtask:
less: {
files: 'less/**/*.less',
tasks: ['less', 'cssmin:core]
}
, , cssmin, .