Skip to content

Instantly share code, notes, and snippets.

@campino2k
Created January 2, 2013 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save campino2k/4434122 to your computer and use it in GitHub Desktop.
Save campino2k/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