Added bower:install to gruntfile.

This patch adds the bower:install command to the gruntfile,
and links it in with various established commands. This allows
us to abstract the use of bower behind `npm run`, and decouples
infra's npm build from having to know about it.

Change-Id: Ic400a95991fc3a0283201979b632e01f066a49c7
This commit is contained in:
Michael Krotscheck 2015-04-08 15:35:52 -07:00
parent 990f2c7d84
commit 8e79019781
2 changed files with 23 additions and 0 deletions

View File

@ -66,6 +66,20 @@ module.exports = function (grunt) {
grunt.initConfig({
/**
* grunt bower
*
* Runs the bower install command, resolving remote runtime
* dependencies.
*/
bower: {
install: {
options: {
copy: false
}
}
},
/**
* grunt clean
*
@ -574,6 +588,7 @@ module.exports = function (grunt) {
* Compile and packages our code.
*/
grunt.registerTask('build', [
'bower:install',
'compile',
'package'
]);
@ -583,6 +598,7 @@ module.exports = function (grunt) {
* Compile and packages our code.
*/
grunt.registerTask('build:draft', [
'bower:install',
'compile',
'package',
'copy:draft'
@ -595,6 +611,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('serve:dist', [
'clean',
'bower:install',
'compile',
'package',
'open',
@ -609,6 +626,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('serve', [
'clean',
'bower:install',
'compile',
'configureProxies:livereload',
'connect:livereload',
@ -625,6 +643,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('test:unit', [
'clean',
'bower:install',
'compile',
'useminPrepare',
'concat',
@ -640,6 +659,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('test:integration', [
'clean',
'bower:install',
'compile',
'useminPrepare',
'concat',
@ -655,6 +675,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('test:functional', [
'clean',
'bower:install',
'compile',
'connect:test',
'protractor'
@ -667,6 +688,7 @@ module.exports = function (grunt) {
*/
grunt.registerTask('test', [
'clean',
'bower:install',
'compile',
'useminPrepare',
'concat',

View File

@ -29,6 +29,7 @@
"eslint": "0.15.1",
"gifsicle": "1.0.0",
"grunt": "0.4.5",
"grunt-bower-task": "^0.4.0",
"grunt-cli": "0.1.13",
"grunt-connect-proxy": "0.1.11",
"grunt-contrib-clean": "0.6.0",