aboutsummaryrefslogtreecommitdiffstats
path: root/lib/grunt
diff options
context:
space:
mode:
authorKen Sheedlo2013-07-30 15:25:54 -0700
committerKen Sheedlo2013-07-30 17:31:35 -0700
commitaa5a16224bb4e19f44fafebaf04ece7665d5ad5b (patch)
tree8944e15f92f9a6d588eee115f5fec3ae05bc4544 /lib/grunt
parenta7ae292e39713cb351431b5a430f7fa721019e32 (diff)
downloadangular.js-aa5a16224bb4e19f44fafebaf04ece7665d5ad5b.tar.bz2
chore(bower): write grunt task for running bower
Diffstat (limited to 'lib/grunt')
-rw-r--r--lib/grunt/plugins.js12
1 files changed, 12 insertions, 0 deletions
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);
+ });
};