Joey Perrott 4022376b3f build: update scripting and tooling to rely on define=angular_ivy_enabled instream of define=compile (#33983)
We need to migrate to using angular_ivy_enabled value to determine whether to use
Ivy or ViewEngine for package building scripts and for size-tracking and
symbol-extract tooling.

PR Close #33983
2019-11-26 16:38:40 -05:00

58 lines
1.5 KiB
Python

load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "ngc_lib",
srcs = [
"extract_i18n.ts",
"index.ts",
],
module_name = "@angular/bazel",
node_modules = "@npm//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
visibility = [
"//packages/bazel:__pkg__",
"//packages/bazel/test/ngc-wrapped:__subpackages__",
],
deps = [
# BEGIN-INTERNAL
# Only needed when compiling within the Angular repo.
# Users will get this dependency from node_modules.
"//packages/compiler-cli",
# END-INTERNAL
"@npm//@bazel/typescript",
"@npm//@types/node",
"@npm//tsickle",
"@npm//typescript",
],
)
nodejs_binary(
name = "ngc-wrapped",
configuration_env_vars = ["angular_ivy_enabled"],
data = [
":ngc_lib",
"//packages/bazel/third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
"@npm//source-map-support",
"@npm//tslib",
],
entry_point = ":index.ts",
visibility = ["//visibility:public"],
)
nodejs_binary(
name = "xi18n",
data = [
":ngc_lib",
"@npm//source-map-support",
],
entry_point = ":extract_i18n.ts",
visibility = ["//visibility:public"],
)
filegroup(
name = "package_assets",
srcs = ["BUILD.bazel"],
visibility = ["//packages/bazel:__subpackages__"],
)