From 10abe635bf0dd03924eed1929a45e6ba4b6c8a4d Mon Sep 17 00:00:00 2001 From: Chase Coney Date: Sun, 14 Jul 2013 17:44:21 -0500 Subject: [PATCH] Update project to have watch dependency and grunt less automation. --- Gruntfile.js | 24 +++++++++++++++++++++++- package.json | 3 +++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 13858e6..a459926 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-php'); + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-contrib-watch'); grunt.initConfig({ php: { @@ -10,8 +12,28 @@ module.exports = function(grunt) { 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']); } \ No newline at end of file diff --git a/package.json b/package.json index a43603d..b2eec0e 100644 --- a/package.json +++ b/package.json @@ -6,5 +6,8 @@ "grunt": "~0.4.1", "grunt-php": "~0.1.1", "grunt-contrib-less": "~0.5.2" + }, + "devDependencies": { + "grunt-contrib-watch": "~0.4.4" } }