Updates to the grunt tasks make the jade and less tasks more generic, compiling any file they find in place.

This commit is contained in:
Spencer Alger 2014-02-25 12:42:40 -07:00
parent 1872749c72
commit 29c83807f8
3 changed files with 22 additions and 6 deletions

View file

@ -1,6 +1,13 @@
module.exports = function (grunt) {
return {
test: {
src: [
'<%= unitTestDir %>/**/*.jade',
'<%= app %>/partials/**/*.jade',
'<%= app %>/apps/**/*.jade'
],
expand: true,
ext: '.html',
options: {
data: function (src, dest) {
var pattern = grunt.config.process('<%= unitTestDir %>/**/*.js');
@ -10,9 +17,6 @@ module.exports = function (grunt) {
return { tests: JSON.stringify(tests) };
},
client: false
},
files: {
'<%= unitTestDir %>/index.html': '<%= unitTestDir %>/index.jade'
}
}
};

View file

@ -2,7 +2,8 @@ module.exports = {
src: {
src: [
'<%= app %>/styles/**/*.less',
'<%= app %>/apps/**/*.less'
'<%= app %>/apps/**/*.less',
'!_*.less'
],
expand: true,
ext: '.css',

View file

@ -4,9 +4,20 @@ module.exports = function (grunt) {
files: ['<%= unitTestDir %>/*.jade', '<%= unitTestDir %>/**/*.js'],
tasks: ['jade:test', 'mocha:unit']
},
src: {
files: ['<%= src %>'],
less: {
files: [
'<%= app %>/**/*.less',
'<%= src %>/courier/**/*.less'
],
tasks: ['less']
},
jade: {
files: [
'<%= app %>/**/*.jade',
'<%= src %>/courier/**/*.jade',
'!<%= unitTestDir %>/**/*.jade'
],
tasks: ['jade']
}
};
};