From aa5a16224bb4e19f44fafebaf04ece7665d5ad5b Mon Sep 17 00:00:00 2001 From: Ken Sheedlo Date: Tue, 30 Jul 2013 15:25:54 -0700 Subject: chore(bower): write grunt task for running bower --- lib/grunt/plugins.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib') diff --git a/lib/grunt/plugins.js b/lib/grunt/plugins.js index aaf1e73e..a17f62cc 100644 --- a/lib/grunt/plugins.js +++ b/lib/grunt/plugins.js @@ -1,3 +1,4 @@ +var bower = require('bower'); var util = require('./utils.js'); var spawn = require('child_process').spawn; @@ -63,4 +64,15 @@ module.exports = function(grunt) { grunt.registerTask('collect-errors', 'Combine stripped error files', function () { util.collectErrors(); }); + + grunt.registerTask('bower', 'Install Bower packages.', function () { + var done = this.async(); + + bower.commands.install() + .on('log', function (result) { + grunt.log.ok('bower: ' + result.id + ' ' + result.data.endpoint.name); + }) + .on('error', grunt.fail.warn.bind(grunt.fail)) + .on('end', done); + }); }; -- cgit v1.2.3