angular-cn/dev-infra/BUILD.bazel

65 lines
2.0 KiB
Python

load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
name = "cli",
srcs = [
"cli.ts",
],
module_name = "@angular/dev-infra-private",
deps = [
"//dev-infra/commit-message",
"//dev-infra/pullapprove",
"//dev-infra/ts-circular-dependencies",
"//dev-infra/utils:config",
"@npm//@types/node",
"@npm//@types/yargs",
"@npm//yargs",
],
)
genrule(
name = "package-json",
srcs = [
"tmpl-package.json",
"//:package.json",
],
outs = ["package.json"],
cmd = """
$(execpath //tools:inline-package-json-deps) $(execpath tmpl-package.json) \
$(execpath //:package.json) $@
""",
tools = ["//tools:inline-package-json-deps"],
)
pkg_npm(
name = "npm_package",
srcs = [
"BUILD.bazel",
"//dev-infra/benchmark:files",
],
substitutions = {
# angular/angular should not consume it's own packages, so we use
# substitutions to replace these in the deployed version of dev-infra.
"//dev-infra/": "@npm_dev_infra//",
"//packages/benchpress": "@npm//@angular/benchpress",
"//packages/bazel/src:esm5.bzl": "@npm_angular_bazel//src:esm5.bzl",
"//packages/zone.js/dist:zone.js": "@npm//:node_modules/zone.js/dist/zone.js",
"//packages/core": "@npm//@angular/core",
"//packages/platform-browser": "@npm//@angular/platform-browser",
# This substitution is particularly verbose because we need to make sure
# that only things available via Angular Bazel are imported from
# tools/defaults.bzl.
"load\(\"//tools:defaults.bzl\", \"ng_module\"\)": "load(\"@npm_angular_bazel//:index.bzl\", \"ng_module\")",
},
visibility = ["//visibility:public"],
deps = [
":cli",
":package-json",
"//dev-infra/benchmark/driver-utilities",
"//dev-infra/commit-message",
"//dev-infra/ts-circular-dependencies",
],
)