Created
January 2, 2013 12:07
-
-
Save chrisjung-dev/4434122 to your computer and use it in GitHub Desktop.
Gruntfile with watch and less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*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