Skip to content

Instantly share code, notes, and snippets.

@joshblack
Created March 24, 2014 23:43
Show Gist options
  • Save joshblack/9751854 to your computer and use it in GitHub Desktop.
Save joshblack/9751854 to your computer and use it in GitHub Desktop.
Simple LESS configuration for Grunt
'use strict';
module.exports = function (grunt) {
// Load our grunt tasks
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
grunt.initConfig({
watch: {
options: {
livereload: true
},
// If any .less file changes in root directory run the less task.
files: "*.less",
tasks: ["less", "notify:watch_less"]
},
// grunt-contrib-less task configuration
less: {
development: {
files: {
// compilation.css: source.less
"site.css": "site.less"
}
},
},
notify: {
watch_less: {
options: {
title: 'Task Complete',
message: 'LESS finished compiling'
}
}
}
});
grunt.registerTask('default', ['watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment