test(bazel): Make sure CLI project created with Bazel works with original workflow (#27741)
Bazel bits added to a CLI project should not be destructive. The project should still work under the original CLI workflow. PR Close #27741
This commit is contained in:

committed by
Matias Niemelä

parent
6a13c107cf
commit
2013ef7ed0
@ -2,7 +2,7 @@
|
||||
|
||||
set -eux -o pipefail
|
||||
|
||||
function test() {
|
||||
function testBazel() {
|
||||
# Set up
|
||||
bazel version
|
||||
rm -rf demo
|
||||
@ -18,4 +18,20 @@ function test() {
|
||||
ng e2e
|
||||
}
|
||||
|
||||
test
|
||||
function testNonBazel() {
|
||||
# Replace angular.json that uses Bazel builder with the default generated by CLI
|
||||
cp ../angular.json.original ./angular.json
|
||||
# TODO(kyliau) Remove this once the additional assertion is added to CLI
|
||||
cp ../app.e2e-spec.ts ./e2e/src/
|
||||
# TODO(kyliau) Remove this once web_package rule is in use
|
||||
cp ../index.html ./src/
|
||||
rm -rf dist src/main.dev.ts src/main.prod.ts
|
||||
# Just make a symlink instead of full yarn install to expose node_modules
|
||||
ln -s $(bazel info output_base)/external/npm/node_modules node_modules
|
||||
ng build
|
||||
ng test --watch=false
|
||||
ng e2e
|
||||
}
|
||||
|
||||
testBazel
|
||||
testNonBazel
|
||||
|
Reference in New Issue
Block a user