From 576269b1b719715e3aec587edf4004ccc3d18f5b Mon Sep 17 00:00:00 2001 From: Ken Sheedlo Date: Mon, 29 Jul 2013 16:58:55 -0700 Subject: fix(bower): update bower usage and resources Changes: - Fix our old code to use bower_components/ as the install dir - Fix the Bootstrap asset to use github.com/twbs/bootstrap (it moved) - Fail the build on Bower failure. Bower should not fail silently. --- .gitignore | 1 + Gruntfile.js | 6 ++++-- angularFiles.js | 4 ++-- bower.json | 3 +-- docs/src/gen-docs.js | 16 ++++++++-------- lib/grunt/utils.js | 6 ++---- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index e7bc3e12..c43b7e8c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ performance/temp*.html angular.js.tmproj /node_modules/ /components/ +/bower_components/ angular.xcodeproj .idea .agignore diff --git a/Gruntfile.js b/Gruntfile.js index 6d0395fb..af04aca8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -106,7 +106,9 @@ module.exports = function(grunt) { bower: { command: 'node ./node_modules/bower/bin/bower install', options: { - stdout: false + stdout: true, + stderr: true, + failOnError: true } } }, @@ -116,7 +118,7 @@ module.exports = function(grunt) { scenario: { dest: 'build/angular-scenario.js', src: [ - 'components/jquery/jquery.js', + 'bower_components/jquery/jquery.js', util.wrap([files['angularSrc'], files['angularScenario']], 'ngScenario/angular') ], styles: { diff --git a/angularFiles.js b/angularFiles.js index c06f8adc..60bae40a 100755 --- a/angularFiles.js +++ b/angularFiles.js @@ -117,7 +117,7 @@ angularFiles = { ], 'karma': [ - 'components/jquery/jquery.js', + 'bower_components/jquery/jquery.js', 'test/jquery_remove.js', '@angularSrc', 'src/publishExternalApis.js', @@ -154,7 +154,7 @@ angularFiles = { ], 'karmaJquery': [ - 'components/jquery/jquery.js', + 'bower_components/jquery/jquery.js', 'test/jquery_alias.js', '@angularSrc', 'src/publishExternalApis.js', diff --git a/bower.json b/bower.json index 05d38ddb..2828e3a2 100644 --- a/bower.json +++ b/bower.json @@ -1,12 +1,11 @@ { "name": "AngularJS", - "directory": "components", "devDependencies": { "jquery": "git://github.com/components/jquery.git#v1.8.3", "lunr.js": "0.4.0", "google-code-prettify": "1.0.0", "components-font-awesome": "3.1.0", - "bootstrap": "https://raw.github.com/twitter/bootstrap/v2.0.2/docs/assets/bootstrap.zip", + "bootstrap": "https://raw.github.com/twbs/bootstrap/v2.0.2/docs/assets/bootstrap.zip", "closure-compiler": "https://closure-compiler.googlecode.com/files/compiler-20130603.zip", "ng-closure-runner": "https://raw.github.com/angular/ng-closure-runner/v0.2.1/assets/ng-closure-runner.zip" } diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js index 10b01385..61fd3b3a 100755 --- a/docs/src/gen-docs.js +++ b/docs/src/gen-docs.js @@ -79,16 +79,16 @@ function writeTheRest(writesFuture) { var manifest = 'manifest="/build/docs/appcache.manifest"'; - writesFuture.push(writer.copyDir('components/components-font-awesome/css', 'components/font-awesome/css')); - writesFuture.push(writer.copyDir('components/components-font-awesome/font', 'components/font-awesome/font')); - writesFuture.push(writer.copyDir('components/bootstrap', 'components/bootstrap')); + writesFuture.push(writer.copyDir('bower_components/components-font-awesome/css', 'components/font-awesome/css')); + writesFuture.push(writer.copyDir('bower_components/components-font-awesome/font', 'components/font-awesome/font')); + writesFuture.push(writer.copyDir('bower_components/bootstrap', 'components/bootstrap')); writesFuture.push(writer.copy('node_modules/marked/lib/marked.js', 'components/marked.js')); - writesFuture.push(writer.copy('components/lunr.js/lunr.js', 'components/lunr.js')); - writesFuture.push(writer.copy('components/lunr.js/lunr.min.js', 'components/lunr.min.js')); - writesFuture.push(writer.copy('components/jquery/jquery.js', 'components/jquery.js')); - writesFuture.push(writer.copy('components/jquery/jquery.min.js', 'components/jquery.min.js')); - writesFuture.push(writer.copy('components/google-code-prettify/src/prettify.js', 'components/google-code-prettify.js')); + writesFuture.push(writer.copy('bower_components/lunr.js/lunr.js', 'components/lunr.js')); + writesFuture.push(writer.copy('bower_components/lunr.js/lunr.min.js', 'components/lunr.min.js')); + writesFuture.push(writer.copy('bower_components/jquery/jquery.js', 'components/jquery.js')); + writesFuture.push(writer.copy('bower_components/jquery/jquery.min.js', 'components/jquery.min.js')); + writesFuture.push(writer.copy('bower_components/google-code-prettify/src/prettify.js', 'components/google-code-prettify.js')); writesFuture.push(writer.copy('docs/components/angular-bootstrap/bootstrap.js', 'components/angular-bootstrap.js')); writesFuture.push(writer.copy('docs/components/angular-bootstrap/bootstrap-prettify.js', 'components/angular-bootstrap-prettify.js')); diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js index 97beb71b..81ba063a 100644 --- a/lib/grunt/utils.js +++ b/lib/grunt/utils.js @@ -146,10 +146,8 @@ module.exports = { 'java ' + this.java32flags() + ' ' + '-Xmx2g ' + - '-cp components/closure-compiler/compiler.jar' + classPathSep + - 'components/ng-closure-runner/ngcompiler.jar ' + - // '-classpath ./components/closure-compiler/compiler.jar' + classPathSep + - // './components/ng-closure-runner/ngcompiler.jar ' + + '-cp bower_components/closure-compiler/compiler.jar' + classPathSep + + 'bower_components/ng-closure-runner/ngcompiler.jar ' + 'org.angularjs.closurerunner.NgClosureRunner ' + '--compilation_level SIMPLE_OPTIMIZATIONS ' + '--language_in ECMASCRIPT5_STRICT ' + -- cgit v1.2.3