Skip to content

Instantly share code, notes, and snippets.

@thekarel
Created September 18, 2013 09:39
Show Gist options
  • Save thekarel/6606841 to your computer and use it in GitHub Desktop.
Save thekarel/6606841 to your computer and use it in GitHub Desktop.
Grunt template for LESS projects
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
styles: {
files: ["css/less/*"],
tasks: ["less:development"],
options: {
livereload: true
}
},
}, // end watch
less: {
development: {
options: {
paths: ["css/less"]
},
files: {
"css/main.css": "css/less/main.less"
}
}
} // end LESS
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task(s).
grunt.registerTask('default', ['watch']);
};
{
"name": "project-x",
"version": "0.1.0",
"description": "Project X",
"main": "index.html",
"directories": {
"doc": "doc"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": "",
"keywords": [
""
],
"author": "Charles Szilagyi",
"license": "(c) VML London",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-watch": "~0.5.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment