added support for less file to grunt runner.
This commit is contained in:
parent
27f45cfdee
commit
33aad6e8ef
26
Gruntfile.js
26
Gruntfile.js
|
@ -35,8 +35,18 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
less : {
|
less : {
|
||||||
bootstrap: {
|
bootstrap: {
|
||||||
src: ["UI/Content/bootstrap/bootstrap.less"],
|
src : "UI/Content/bootstrap/bootstrap.less",
|
||||||
dest: "_output/UI/Content/bootstrap.css"
|
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 : {
|
files : {
|
||||||
src : ['UI/**/*emplate.html'],
|
src : ['UI/**/*emplate.html'],
|
||||||
dest: '_output/UI/templates.js'
|
dest: '_output/UI/templates.js'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
copy: {
|
copy: {
|
||||||
|
@ -76,15 +86,19 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
fonts : {
|
fonts : {
|
||||||
src : 'UI/**/Fonts/*.*',
|
src : 'UI/**/Fonts/*.*',
|
||||||
dest: '_output/',
|
dest: '_output/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
bootstrap : {
|
bootstrap : {
|
||||||
files: 'NzbDrone.Backbone/Content/bootstrap/*.less',
|
files: '<%= less.bootstrap.src %>',
|
||||||
tasks: ['less:bootstrap']
|
tasks: ['less:bootstrap']
|
||||||
},
|
},
|
||||||
|
generalLess: {
|
||||||
|
files: ['UI/**/*.less', '!**/Bootstrap/**'],
|
||||||
|
tasks: ['less:general']
|
||||||
|
},
|
||||||
handlebars : {
|
handlebars : {
|
||||||
files: '<%= handlebars.files.src %>',
|
files: '<%= handlebars.files.src %>',
|
||||||
tasks: ['handlebars']
|
tasks: ['handlebars']
|
||||||
|
@ -123,8 +137,8 @@ module.exports = function(grunt) {
|
||||||
grunt.loadNpmTasks('grunt-notify');
|
grunt.loadNpmTasks('grunt-notify');
|
||||||
grunt.loadNpmTasks('grunt-curl');
|
grunt.loadNpmTasks('grunt-curl');
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('default', ['copy','less:bootstrap','handlebars', 'watch']);
|
grunt.registerTask('default', ['copy', 'less', 'handlebars', 'watch']);
|
||||||
grunt.registerTask('package', ['copy','less:bootstrap','handlebars']);
|
grunt.registerTask('package', ['copy', 'less', 'handlebars']);
|
||||||
grunt.registerTask('update', ['curl']);
|
grunt.registerTask('update', ['curl']);
|
||||||
|
|
||||||
};
|
};
|
Loading…
Reference in New Issue