public
Created

Gruntfile with watch and less

  • Download Gist
Gruntfile.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/*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');
};

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.