build: upgrade bazel rules to latest (#20768)
Add enough BUILD files to make it possible to `bazel build packages/core/test` Also re-format BUILD.bazel files with Buildifier. Add a CI lint check that they stay formatted. PR Close #20768
This commit is contained in:
@ -4,41 +4,42 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
|
||||
ts_library(
|
||||
name = "ngc_lib",
|
||||
srcs = [
|
||||
"index.ts",
|
||||
"extract_i18n.ts",
|
||||
"index.ts",
|
||||
],
|
||||
module_name = "@angular/bazel",
|
||||
tsconfig = ":tsconfig.json",
|
||||
visibility = ["//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
|
||||
"@build_bazel_rules_typescript//internal/tsc_wrapped"
|
||||
"@build_bazel_rules_typescript//internal/tsc_wrapped",
|
||||
],
|
||||
tsconfig = ":tsconfig.json",
|
||||
visibility = ["//test/ngc-wrapped:__subpackages__"],
|
||||
)
|
||||
|
||||
nodejs_binary(
|
||||
name = "ngc-wrapped",
|
||||
data = [
|
||||
":ngc_lib",
|
||||
"@build_bazel_rules_typescript//internal:worker_protocol.proto",
|
||||
],
|
||||
# Entry point assumes the user is outside this WORKSPACE,
|
||||
# and references our rules with @angular//src/ngc-wrapped
|
||||
entry_point = "angular/src/ngc-wrapped/index.js",
|
||||
data = [
|
||||
":ngc_lib",
|
||||
"@build_bazel_rules_typescript//internal:worker_protocol.proto"
|
||||
],
|
||||
node_modules = "@build_bazel_rules_typescript_deps//:node_modules",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
nodejs_binary(
|
||||
name = "xi18n",
|
||||
# Entry point assumes the user is outside this WORKSPACE,
|
||||
# and references our rules with @angular//src/ngc-wrapped
|
||||
entry_point = "angular/src/ngc-wrapped/index.js/extract_i18n.js",
|
||||
data = [
|
||||
":ngc_lib",
|
||||
],
|
||||
# Entry point assumes the user is outside this WORKSPACE,
|
||||
# and references our rules with @angular//src/ngc-wrapped
|
||||
entry_point = "angular/src/ngc-wrapped/index.js/extract_i18n.js",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
Reference in New Issue
Block a user