diff options
| author | Ken Sheedlo | 2013-07-30 15:25:54 -0700 |
|---|---|---|
| committer | Ken Sheedlo | 2013-07-30 17:31:35 -0700 |
| commit | aa5a16224bb4e19f44fafebaf04ece7665d5ad5b (patch) | |
| tree | 8944e15f92f9a6d588eee115f5fec3ae05bc4544 /lib/grunt | |
| parent | a7ae292e39713cb351431b5a430f7fa721019e32 (diff) | |
| download | angular.js-aa5a16224bb4e19f44fafebaf04ece7665d5ad5b.tar.bz2 | |
chore(bower): write grunt task for running bower
Diffstat (limited to 'lib/grunt')
| -rw-r--r-- | lib/grunt/plugins.js | 12 |
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); + }); }; |
