added less compilation via watch, and a task which will build the less and jade, start the server, then watch for changes
This commit is contained in:
parent
cfabe422b5
commit
37940f3974
|
@ -16,7 +16,8 @@
|
|||
"mocha": "~1.17.1",
|
||||
"less-middleware": "~0.1.15",
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
"grunt-contrib-jade": "~0.10.0"
|
||||
"grunt-contrib-jade": "~0.10.0",
|
||||
"grunt-contrib-less": "~0.9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt test",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@import '../../bower_components/bootstrap/less/bootstrap.less';
|
||||
@import '../../bower_components/bootstrap/less/theme.less';
|
||||
@import "../../bower_components/bootstrap/less/bootstrap.less";
|
||||
@import "../../bower_components/bootstrap/less/theme.less";
|
||||
|
||||
body {
|
||||
margin: 25px;
|
||||
|
|
13
tasks/config/less.js
Normal file
13
tasks/config/less.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
src: {
|
||||
src: [
|
||||
'<%= app %>/styles/**/*.less',
|
||||
'<%= app %>/apps/**/*.less'
|
||||
],
|
||||
expand: true,
|
||||
ext: '.css',
|
||||
options: {
|
||||
ieCompat: false
|
||||
}
|
||||
}
|
||||
};
|
|
@ -3,6 +3,10 @@ module.exports = function (grunt) {
|
|||
test: {
|
||||
files: ['<%= unitTestDir %>/*.jade', '<%= unitTestDir %>/**/*.js'],
|
||||
tasks: ['jade:test', 'mocha:unit']
|
||||
},
|
||||
src: {
|
||||
files: ['<%= src %>'],
|
||||
tasks: ['less']
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Lint and build CSS
|
||||
module.exports = function(grunt) {
|
||||
grunt.registerTask('default', ['jshint:source','test']);
|
||||
module.exports = function (grunt) {
|
||||
grunt.registerTask('default', ['jshint:source', 'test']);
|
||||
};
|
3
tasks/dev.js
Normal file
3
tasks/dev.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = function (grunt) {
|
||||
grunt.registerTask('dev', ['less', 'jade', 'connect:dev', 'watch']);
|
||||
};
|
Loading…
Reference in a new issue