grunt-newer-less is a set of helpers which enables LESS compilation when using grunt-newer.
npm install grunt-newer-less
var gruntNewerLess = require('grunt-newer-less');
newer: {
options: {
override: gruntNewerLess.overrideLess
}
}
newer: {
options: {
override: function(detail, include) {
if (detail.task === 'less') {
gruntNewerLess.checkForNewerImports(detail.path, detail.time, include);
} else {
include(false);
}
}
}
}
Adapted from the following gists: https://gist.github.com/cgmartin/10328349 https://gist.github.com/migreva/2a926b95f25366da657c