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:
Alex Eagle
2017-12-06 06:56:49 -08:00
committed by Jason Aden
parent 073f485c72
commit ef534c0cc1
61 changed files with 757 additions and 131 deletions

View File

@ -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"],
)