From 68d59f816b2cceab7a3329fc42e4c395fffe7cd2 Mon Sep 17 00:00:00 2001 From: Vit Brunner Date: Fri, 31 Oct 2014 17:11:44 +0100 Subject: [PATCH] Less repetition in grunt file --- Gruntfile.coffee | 10 +++------- package.json | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 98425e4..91886ae 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,3 +1,5 @@ +_ = require('lodash'); + module.exports = (grunt) -> vars = { scripts: [ @@ -106,13 +108,7 @@ module.exports = (grunt) -> dest: 'build-min' ext: '.html' options: { - data: { - scripts: vars.scripts - styles: vars.styles - test_scripts: vars.test_scripts - test_styles: vars.test_styles - min: true - } + data: _.extend {}, vars, { min: true } } } } diff --git a/package.json b/package.json index 92cb9f4..5d8fe48 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "grunt-contrib-qunit": "0.5.x", "grunt-contrib-stylus": "0.20.x", "grunt-contrib-uglify": "0.6.x", - "grunt-contrib-watch": "0.6.x" + "grunt-contrib-watch": "0.6.x", + "lodash": "2.4.x" }, "scripts": { "test": "node_modules/.bin/grunt test",