From b6b2bdf4d9d0e8de54e436a2e4754cd7017aca2b Mon Sep 17 00:00:00 2001 From: LeoColomb Date: Mon, 17 Feb 2014 16:01:00 +0100 Subject: [PATCH] Improve Grunt engine --- Gruntfile.js | 40 +++++++++++++++++++++++----------------- package.json | 8 ++++---- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index a459926..64e57d9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,6 @@ -module.exports = function(grunt) { +module.exports = function (grunt) { + 'use strict'; + grunt.loadNpmTasks('grunt-php'); grunt.loadNpmTasks('grunt-contrib-less'); grunt.loadNpmTasks('grunt-contrib-watch'); @@ -7,33 +9,37 @@ module.exports = function(grunt) { php: { dist: { options: { - keepalive: true, - open: true, + keepalive: true, + open: true, 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" + development: { + options: { + cleancss: true, + report: 'min' + }, + files: { + "css/daux-blue.min.css": "less/daux-blue.less", + "css/daux-green.min.css": "less/daux-green.less", + "css/daux-navy.min.css": "less/daux-navy.less", + "css/daux-red.min.css": "less/daux-red.less" + } } - } }, watch: { - scripts: { - files: ['less/**/*.less'], - tasks: ['less'], - options: { - nospawn: true + scripts: { + files: ['less/**/*.less'], + tasks: ['less'], + options: { + nospawn: true + }, }, - }, }, }); //grunt.registerTask('default', ['less', 'watch']); grunt.registerTask('default', ['php']); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/package.json b/package.json index b2eec0e..cc420ba 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "daux.io", - "version": "0.1.0", + "version": "0.1.1", "private": true, "dependencies": { "grunt": "~0.4.1", - "grunt-php": "~0.1.1", - "grunt-contrib-less": "~0.5.2" + "grunt-php": "~0.3.0", + "grunt-contrib-less": "~0.9.0" }, "devDependencies": { - "grunt-contrib-watch": "~0.4.4" + "grunt-contrib-watch": "~0.5.0" } }