angular-cn/packages/bazel/BUILD.bazel
Keen Yee Liau 4a92fa9471 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
2019-02-05 14:40:46 -05:00

30 lines
958 B
Python

load("//tools:defaults.bzl", "npm_package")
npm_package(
name = "npm_package",
srcs = [
"check_version.js",
"package.json",
"protractor-utils.js",
"//packages/bazel/src:package_assets",
"//packages/bazel/src/builders:package_assets",
"//packages/bazel/src/schematics:package_assets",
],
packages = [
"//packages/bazel/docs",
],
tags = ["release-with-framework"],
# Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds.
visibility = ["//visibility:private"],
deps = [
"//packages/bazel/src/builders",
"//packages/bazel/src/ng_package:lib",
"//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",
],
)