Update project to have watch dependency and grunt less automation.

This commit is contained in:
Chase Coney 2013-07-14 17:44:21 -05:00
parent 47a3016a73
commit 10abe635bf
2 changed files with 26 additions and 1 deletions

View File

@ -1,5 +1,7 @@
module.exports = function(grunt) { module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-php'); grunt.loadNpmTasks('grunt-php');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({ grunt.initConfig({
php: { php: {
@ -10,8 +12,28 @@ module.exports = function(grunt) {
port: 8085 port: 8085
} }
} }
},
less: {
development: {
files: {
"css/daux-blue.css": "less/daux-blue.less",
"css/daux-green.css": "less/daux-green.less",
"css/daux-navy.css": "less/daux-navy.less",
"css/daux-red.css": "less/daux-red.less"
} }
}
},
watch: {
scripts: {
files: ['less/**/*.less'],
tasks: ['less'],
options: {
nospawn: true
},
},
},
}); });
//grunt.registerTask('default', ['less', 'watch']);
grunt.registerTask('default', ['php']); grunt.registerTask('default', ['php']);
} }

View File

@ -6,5 +6,8 @@
"grunt": "~0.4.1", "grunt": "~0.4.1",
"grunt-php": "~0.1.1", "grunt-php": "~0.1.1",
"grunt-contrib-less": "~0.5.2" "grunt-contrib-less": "~0.5.2"
},
"devDependencies": {
"grunt-contrib-watch": "~0.4.4"
} }
} }