From dbccddbc22d721c4232b7f784c2eca8aa6769a3e Mon Sep 17 00:00:00 2001 From: Till Klocke Date: Thu, 6 Aug 2015 18:33:20 +0200 Subject: [PATCH] The default grunt task now installs bower components, thus saving one step in the developer docs --- Gruntfile.js | 2 +- package.json | 1 + tasks/build.js | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3dfc70e..b53c51d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,7 +17,7 @@ module.exports = function (grunt) { grunt.loadTasks("tasks") - grunt.registerTask("default", ["lint", "saveRevision", "copy", "sass", "requirejs"]) + grunt.registerTask("default", ["bower-install-simple", "lint", "saveRevision", "copy", "sass", "requirejs"]) grunt.registerTask("lint", ["eslint"]) grunt.registerTask("dev", ["default", "connect:server", "watch"]) } diff --git a/package.json b/package.json index 5b54b11..cc9ebf1 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "grunt-contrib-uglify": "^0.5.1", "grunt-contrib-watch": "^0.6.1", "grunt-eslint": "^10.0.0", + "grunt-bower-install-simple": "^1.1.2", "grunt-git-describe": "^2.3.2" }, "eslintConfig": { diff --git a/tasks/build.js b/tasks/build.js index b7b34be..7b3ee0a 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -1,5 +1,6 @@ module.exports = function(grunt) { grunt.config.merge({ + bowerdir: "bower_components", copy: { html: { options: { @@ -74,6 +75,19 @@ module.exports = function(grunt) { } } }, + "bower-install-simple": { + options: { + directory: "<%=bowerdir%>", + color: true, + interactive: false, + production: true + }, + "prod": { + options: { + production: true + } + } + }, requirejs: { compile: { options: { @@ -89,6 +103,7 @@ module.exports = function(grunt) { } }) + grunt.loadNpmTasks("grunt-bower-install-simple") grunt.loadNpmTasks("grunt-contrib-copy") grunt.loadNpmTasks("grunt-contrib-requirejs") grunt.loadNpmTasks("grunt-contrib-sass")