Skip to content

Instantly share code, notes, and snippets.

@chrisjung-dev
Created January 2, 2013 12:07
Show Gist options
  • Save chrisjung-dev/4434122 to your computer and use it in GitHub Desktop.
Save chrisjung-dev/4434122 to your computer and use it in GitHub Desktop.
Gruntfile with watch and less
/*global module:false*/
module.exports = function(grunt) {
// Initialisiert Grunt mit den folgenden Projekteinstellungen
grunt.initConfig({
less: {
development: {
options: {
paths: ["less"]
},
files: {
"style.css": "style.less"
}
},
production: {
options: {
paths: ["less"],
compress: true
},
files: {
"style.css": "style.less"
}
}
},
/*
Watch less files
*/
watch: {
styles: {
files: '*.less',
tasks: ['less:development']
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task, der ausgeführt wird, wenn man Grunt
// ohne weitere Parameter aufruft.
grunt.registerTask('default', 'less:development');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment