Last active
August 29, 2015 13:59
-
-
Save atestu/10678400 to your computer and use it in GitHub Desktop.
Simple LESS Gruntfile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function (grunt) { | |
// load all grunt tasks | |
grunt.loadNpmTasks('grunt-contrib-less'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.initConfig({ | |
watch: { | |
// if any .less file changes in directory "public/css/" run the "less"-task. | |
files: "css/*.less", | |
tasks: ["less"] | |
}, | |
// "less"-task configuration | |
less: { | |
// production config is also available | |
development: { | |
options: { | |
// Specifies directories to scan for @import directives when parsing. | |
// Default value is the directory of the source, which is probably what you want. | |
paths: ["css/"], | |
}, | |
files: { | |
// compilation.css : source.less | |
"css/app.css": "css/app.less" | |
} | |
}, | |
}, | |
}); | |
// the default task (running "grunt" in console) is "watch" | |
grunt.registerTask('default', ['watch']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment