added support for less file to grunt runner.

pull/4/head
kay.one 12 years ago
parent 27f45cfdee
commit 33aad6e8ef

@ -35,8 +35,18 @@ module.exports = function(grunt) {
},
less : {
bootstrap: {
src: ["UI/Content/bootstrap/bootstrap.less"],
src : "UI/Content/bootstrap/bootstrap.less",
dest: "_output/UI/Content/bootstrap.css"
},
general : {
files: [
{
expand: true,
src : ['UI/**/*.less', '!**/Bootstrap/**'],
dest : '_output/',
ext : '.css'
}
]
}
},
@ -54,7 +64,7 @@ module.exports = function(grunt) {
files : {
src : ['UI/**/*emplate.html'],
dest: '_output/UI/templates.js'
},
}
},
copy: {
@ -76,15 +86,19 @@ module.exports = function(grunt) {
},
fonts : {
src : 'UI/**/Fonts/*.*',
dest: '_output/',
dest: '_output/'
}
},
watch: {
bootstrap : {
files: 'NzbDrone.Backbone/Content/bootstrap/*.less',
files: '<%= less.bootstrap.src %>',
tasks: ['less:bootstrap']
},
generalLess: {
files: ['UI/**/*.less', '!**/Bootstrap/**'],
tasks: ['less:general']
},
handlebars : {
files: '<%= handlebars.files.src %>',
tasks: ['handlebars']
@ -123,8 +137,8 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-curl');
// Default task(s).
grunt.registerTask('default', ['copy','less:bootstrap','handlebars', 'watch']);
grunt.registerTask('package', ['copy','less:bootstrap','handlebars']);
grunt.registerTask('default', ['copy', 'less', 'handlebars', 'watch']);
grunt.registerTask('package', ['copy', 'less', 'handlebars']);
grunt.registerTask('update', ['curl']);
};
Loading…
Cancel
Save