Bower blocks build on first run

- aspnet/Mvc#2116
- run Bower non-interatively from our scripts
 - does not affect grunt-brower-task; programmatic Bower use never prompts
- see Bower discussion at bower/bower#1162
- FYI `$env:CI = 'TeamCity'` would work similarly but TeamCity does not set that
This commit is contained in:
Doug Bunting 2015-03-11 10:16:44 -07:00
parent 30e4b1c167
commit f6ae75eac5
1 changed files with 4 additions and 1 deletions

View File

@ -3,9 +3,12 @@ default nodeDir = '${Path.Combine(currentDir, "bin", "nodejs")}'
var bowerLibrary = '${ Path.Combine(nodeDir, "node_modules", "bower", "bin", "bower") }'
var bowerInstalled = '${ File.Exists(bowerLibrary) }'
default bowerGloballyInstalled = '${ !bowerInstalled && TestCommand("bower", "--version") }'
default bowerGloballyInstalled = '${ !bowerInstalled && TestCommand("bower", "--version --config.interactive=false") }'
var bowerCmd = '${ bowerGloballyInstalled ? "bower" : bowerLibrary }'
- // Turn off Bower's Insight reporting since this usage is scripted.
- bowerCommand = bowerCommand + " --config.interactive=false";
- // Install bower locally if not already installed either globally or locally; creates bowerLibrary file if run
npm npmCommand='install ${E("npm_install_options")} --prefix ${nodeDir} bower' if='!(bowerGloballyInstalled || bowerInstalled)' once='installBower'