Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 906 Bytes

README.md

File metadata and controls

49 lines (36 loc) · 906 Bytes

About

grunt-newer-less is a set of helpers which enables LESS compilation when using grunt-newer.

Install

npm install grunt-newer-less

Add require

var gruntNewerLess = require('grunt-newer-less');

Usage Option 1: standard override of 'newer' grunt task:

newer: {
    options: {
        override: gruntNewerLess.overrideLess
    }
}

Usage Option 2: custom override of 'newer' grunt task:

newer: {
    options: {
        override: function(detail, include) {
            if (detail.task === 'less') {
                gruntNewerLess.checkForNewerImports(detail.path, detail.time, include);
            } else {
                include(false);
            }
        }
    }
}

Credits

Adapted from the following gists: https://gist.github.com/cgmartin/10328349 https://gist.github.com/migreva/2a926b95f25366da657c