2020-03-04 12:42:45 -05:00
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
|
|
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_library")
|
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "cli",
|
|
|
|
srcs = [
|
|
|
|
"cli.ts",
|
|
|
|
],
|
2020-03-17 07:58:17 -04:00
|
|
|
module_name = "@angular/dev-infra-private",
|
2020-03-04 12:42:45 -05:00
|
|
|
deps = [
|
2020-03-10 13:29:44 -04:00
|
|
|
"//dev-infra/commit-message",
|
2020-04-20 16:00:10 -04:00
|
|
|
"//dev-infra/format",
|
2020-05-05 18:37:31 -04:00
|
|
|
"//dev-infra/pr",
|
2020-03-04 17:37:21 -05:00
|
|
|
"//dev-infra/pullapprove",
|
2020-04-20 17:44:25 -04:00
|
|
|
"//dev-infra/release",
|
2020-03-26 13:45:09 -04:00
|
|
|
"//dev-infra/ts-circular-dependencies",
|
2020-04-20 16:00:10 -04:00
|
|
|
"//dev-infra/utils",
|
2020-03-04 12:42:45 -05:00
|
|
|
"@npm//@types/node",
|
2020-03-26 13:45:09 -04:00
|
|
|
"@npm//@types/yargs",
|
|
|
|
"@npm//yargs",
|
2020-03-04 12:42:45 -05:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-03-17 07:58:17 -04:00
|
|
|
genrule(
|
|
|
|
name = "package-json",
|
|
|
|
srcs = [
|
|
|
|
"tmpl-package.json",
|
|
|
|
"//:package.json",
|
2020-03-04 17:37:21 -05:00
|
|
|
],
|
2020-03-17 07:58:17 -04:00
|
|
|
outs = ["package.json"],
|
|
|
|
cmd = """
|
2020-03-29 16:29:50 -04:00
|
|
|
$(execpath //tools:inline-package-json-deps) $(execpath tmpl-package.json) \
|
|
|
|
$(execpath //:package.json) $@
|
2020-03-17 07:58:17 -04:00
|
|
|
""",
|
|
|
|
tools = ["//tools:inline-package-json-deps"],
|
2020-03-04 17:37:21 -05:00
|
|
|
)
|
|
|
|
|
2020-03-04 12:42:45 -05:00
|
|
|
pkg_npm(
|
|
|
|
name = "npm_package",
|
2020-05-15 13:26:01 -04:00
|
|
|
srcs = [
|
|
|
|
"BUILD.bazel",
|
2020-07-02 08:45:23 -04:00
|
|
|
"//dev-infra/bazel:files",
|
2020-05-15 13:26:01 -04:00
|
|
|
"//dev-infra/benchmark:files",
|
|
|
|
],
|
|
|
|
substitutions = {
|
|
|
|
# angular/angular should not consume it's own packages, so we use
|
2020-05-08 15:56:39 -04:00
|
|
|
# substitutions to replace these in the published version of dev-infra.
|
|
|
|
"//dev-infra/": "@npm_angular_dev_infra_private//",
|
2020-05-15 13:26:01 -04:00
|
|
|
"//packages/benchpress": "@npm//@angular/benchpress",
|
2020-05-08 15:56:39 -04:00
|
|
|
"//packages/bazel/": "@npm_angular_bazel//",
|
2020-05-15 13:26:01 -04:00
|
|
|
"//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\")",
|
|
|
|
},
|
2020-03-04 12:42:45 -05:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2020-03-17 07:58:17 -04:00
|
|
|
":cli",
|
|
|
|
":package-json",
|
2020-05-15 13:26:01 -04:00
|
|
|
"//dev-infra/benchmark/driver-utilities",
|
2020-03-10 13:29:44 -04:00
|
|
|
"//dev-infra/commit-message",
|
2020-03-17 07:58:17 -04:00
|
|
|
"//dev-infra/ts-circular-dependencies",
|
2020-03-04 12:42:45 -05:00
|
|
|
],
|
|
|
|
)
|