refactor(bazel): Create ng-add schematic for Bazel (#28436)

The logic to create additional files needed for Bazel are currently
hosted in `ng new`. Such files include the main.*.ts files needed
for AOT and a different angular.json to use Bazel builder, among others.

This commit refactors the logic into `ng add` so that it can be used to
perform the same modifications in an existing project. Users could do so
by running `ng add @angular/bazel`.

With this change, `ng new` effectively becomes an orchestrator that runs
the original `ng new` followed by `ng add @angular/bazel`.

PR Close #28436
This commit is contained in:
Keen Yee Liau
2019-01-28 11:03:04 -08:00
committed by Matias Niemelä
parent 744b0205e2
commit 4a92fa9471
20 changed files with 617 additions and 542 deletions
+1
View File
@@ -23,6 +23,7 @@ npm_package(
"//packages/bazel/src/ngc-wrapped:ngc_lib",
"//packages/bazel/src/protractor/utils",
"//packages/bazel/src/schematics/bazel-workspace",
"//packages/bazel/src/schematics/ng-add",
"//packages/bazel/src/schematics/ng-new",
],
)