yarn install was disabled in ng-new for Bazel schematics because Bazel manages its own node_modules dependencies and therefore there is no need to install dependencies twice. However, the first yarn install is needed for `ng` commands to work, most notably `ng build`. This commit restores the original behavior. PR Close #28381
30 lines
651 B
Bash
Executable File
30 lines
651 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eux -o pipefail
|
|
|
|
function testBazel() {
|
|
# Set up
|
|
bazel version
|
|
rm -rf demo
|
|
# Create project
|
|
ng new demo --collection=@angular/bazel --defaults --skip-git
|
|
node replace_angular_repo.js "./demo/WORKSPACE"
|
|
cd demo
|
|
cp ../package.json.replace ./package.json
|
|
ng build
|
|
ng test
|
|
ng e2e
|
|
}
|
|
|
|
function testNonBazel() {
|
|
# Replace angular.json that uses Bazel builder with the default generated by CLI
|
|
cp ../angular.json.original ./angular.json
|
|
rm -rf dist src/main.dev.ts src/main.prod.ts
|
|
ng build --progress=false
|
|
ng test --progress=false --watch=false
|
|
ng e2e --configuration=ci
|
|
}
|
|
|
|
testBazel
|
|
testNonBazel
|