aboutsummaryrefslogtreecommitdiffstats
path: root/lib/grunt/plugins.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/grunt/plugins.js')
-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);
+ });
};