build: set a default module_name for ts_library rules (#28051)
PR Close #28051
This commit is contained in:
parent
45bf911df8
commit
38343a2388
@ -37,9 +37,14 @@ ts_devserver(
|
|||||||
|
|
||||||
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
|
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "empty_node_modules",
|
||||||
|
)
|
||||||
|
|
||||||
rollup_bundle(
|
rollup_bundle(
|
||||||
name = "bundle",
|
name = "bundle",
|
||||||
entry_point = "src/main",
|
entry_point = "src/main",
|
||||||
|
node_modules = ":empty_node_modules",
|
||||||
deps = ["//src"],
|
deps = ["//src"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,24 +2,24 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@bazel/bazel-darwin_x64@0.18.0":
|
"@bazel/bazel-darwin_x64@0.20.0":
|
||||||
version "0.18.0"
|
version "0.20.0"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.18.0.tgz#bab437605a702279d42f59caa4741bb327eb7dbc"
|
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.20.0.tgz#648d61c32a3c5fccb7bf70b753071b6e54b11f21"
|
||||||
integrity sha512-um2OzgLL2Gd/W6joOpvrSTcqpnupliPNpwe/uE7sB0huBSJ/4Im0w2IlCTI6C7OfgMcbpUj4YxgUa9T6u6WY6w==
|
integrity sha512-zeoeVK504341GfnaxdaB4pFzQV0YOK1HLiYj3/ocamPFxAJRh9abvKB8iOpqD5Oal0j7VsINxnXCjovp9a4urA==
|
||||||
|
|
||||||
"@bazel/bazel-linux_x64@0.18.0":
|
"@bazel/bazel-linux_x64@0.20.0":
|
||||||
version "0.18.0"
|
version "0.20.0"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.18.0.tgz#0c02b2404ec95c180e17615cc7079ee07df48a69"
|
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.20.0.tgz#2568628a0d0b85dcc69d0ab701b1d6e10551357d"
|
||||||
integrity sha512-Rq8X8bL6SgQvbOHnfPhSgF6hp+f6Fbt2w6pRmBlFvV1J+CeUyrSrrRXfnnO1bjIuq05Ur3mV8ULA0qK6rtA5lQ==
|
integrity sha512-PpHzoEqfXty8dc1/p1tVFXtbPyrE1n0N79QmYePjJ5mJMyW7uBF/zV4IajYY8+IpJEcDVq5v4BavSexOmVJRmA==
|
||||||
|
|
||||||
"@bazel/bazel-win32_x64@0.18.0":
|
"@bazel/bazel-win32_x64@0.20.0":
|
||||||
version "0.18.0"
|
version "0.20.0"
|
||||||
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.18.0.tgz#aa4575fb00066dcf59a6d464971774dea6a0bafd"
|
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.20.0.tgz#af7d041dae4c066e7aa8618949e2de1aad07495e"
|
||||||
integrity sha512-U2TbfK8B7dc3JqXSFwj2oXCQrxEaSzCCUkAHjAOIGOKzx/HLKIKs+NJj9IQkLLr7BsMU+Qqzo8aqo11E+Vs+aA==
|
integrity sha512-3bqHXFBvLnbvNzr1KCQ1zryTYvHMoQffaWVekbckgPyT2VPEj3abuB91+DrRYmZdPjcgPYnjnyanxZHDkKuF2g==
|
||||||
|
|
||||||
"@bazel/bazel@file:../../node_modules/@bazel/bazel":
|
"@bazel/bazel@file:../../node_modules/@bazel/bazel":
|
||||||
version "0.18.0"
|
version "0.20.0"
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
"@bazel/bazel-darwin_x64" "0.18.0"
|
"@bazel/bazel-darwin_x64" "0.20.0"
|
||||||
"@bazel/bazel-linux_x64" "0.18.0"
|
"@bazel/bazel-linux_x64" "0.20.0"
|
||||||
"@bazel/bazel-win32_x64" "0.18.0"
|
"@bazel/bazel-win32_x64" "0.20.0"
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/animations",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
],
|
],
|
||||||
|
@ -12,7 +12,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/animations/browser",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/animations",
|
"//packages/animations",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/animations/browser/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/animations",
|
"//packages/animations",
|
||||||
"//packages/animations/browser",
|
"//packages/animations/browser",
|
||||||
|
@ -10,7 +10,6 @@ ts_library(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/benchpress",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/common",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"@rxjs",
|
"@rxjs",
|
||||||
|
@ -12,7 +12,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/common/http",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -12,7 +12,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/common/http/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common/http",
|
"//packages/common/http",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
["**/*.ts"],
|
["**/*.ts"],
|
||||||
exclude = ["closure-locale.ts"],
|
exclude = ["closure-locale.ts"],
|
||||||
),
|
),
|
||||||
module_name = "@angular/common/locales",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
npm_package(
|
npm_package(
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/common/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -20,7 +20,6 @@ ts_library(
|
|||||||
"src/integrationtest/**/*.ts",
|
"src/integrationtest/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/compiler-cli",
|
|
||||||
tsconfig = ":tsconfig",
|
tsconfig = ":tsconfig",
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"*.ts",
|
"*.ts",
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngcc",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/annotations",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/diagnostics",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
"@ngdeps//typescript",
|
"@ngdeps//typescript",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/*.ts",
|
"src/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/imports",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -8,6 +8,5 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/reflection",
|
|
||||||
deps = ["@ngdeps//typescript"],
|
deps = ["@ngdeps//typescript"],
|
||||||
)
|
)
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/shims",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
"//packages/compiler-cli/src/ngtsc/imports",
|
"//packages/compiler-cli/src/ngtsc/imports",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/switch",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
"@ngdeps//typescript",
|
"@ngdeps//typescript",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/transform",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
"//packages/compiler-cli/src/ngtsc/diagnostics",
|
||||||
|
@ -5,7 +5,6 @@ load("//tools:defaults.bzl", "ts_library")
|
|||||||
ts_library(
|
ts_library(
|
||||||
name = "translator",
|
name = "translator",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/translator",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -5,7 +5,6 @@ load("//tools:defaults.bzl", "ts_library")
|
|||||||
ts_library(
|
ts_library(
|
||||||
name = "typecheck",
|
name = "typecheck",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/typecheck",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -8,7 +8,6 @@ ts_library(
|
|||||||
"index.ts",
|
"index.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/compiler-cli/src/ngtsc/util",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"@ngdeps//@types/node",
|
"@ngdeps//@types/node",
|
||||||
|
@ -10,7 +10,6 @@ ts_library(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/compiler",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ng_package(
|
ng_package(
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
["**/*.ts"],
|
["**/*.ts"],
|
||||||
exclude = ["testing.ts"],
|
exclude = ["testing.ts"],
|
||||||
),
|
),
|
||||||
module_name = "@angular/compiler/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/core/src/compiler",
|
"//packages/core/src/compiler",
|
||||||
|
@ -13,7 +13,6 @@ ts_library(
|
|||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core/compiler",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core/src/util",
|
"//packages/core/src/util",
|
||||||
],
|
],
|
||||||
|
@ -12,7 +12,6 @@ ts_library(
|
|||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core/di/interface",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core/src/interface",
|
"//packages/core/src/interface",
|
||||||
"//packages/core/src/util",
|
"//packages/core/src/util",
|
||||||
|
@ -12,5 +12,4 @@ ts_library(
|
|||||||
"*.ts",
|
"*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core/interface",
|
|
||||||
)
|
)
|
||||||
|
@ -12,7 +12,6 @@ ts_library(
|
|||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core/reflection",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core/src/interface",
|
"//packages/core/src/interface",
|
||||||
"//packages/core/src/util",
|
"//packages/core/src/util",
|
||||||
|
@ -12,7 +12,6 @@ ts_library(
|
|||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core/util",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core/src/interface",
|
"//packages/core/src/interface",
|
||||||
"@rxjs",
|
"@rxjs",
|
||||||
|
@ -9,7 +9,6 @@ ng_module(
|
|||||||
srcs = glob(
|
srcs = glob(
|
||||||
["**/*.ts"],
|
["**/*.ts"],
|
||||||
),
|
),
|
||||||
module_name = "@angular/core/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/elements",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/platform-browser",
|
"//packages/platform-browser",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/forms",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/platform-browser",
|
"//packages/platform-browser",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/http",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/platform-browser",
|
"//packages/platform-browser",
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/http/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/http",
|
"//packages/http",
|
||||||
|
@ -10,7 +10,6 @@ ts_library(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/language-service",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/platform-browser-dynamic",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/platform-browser-dynamic/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/compiler",
|
"//packages/compiler",
|
||||||
"//packages/compiler/testing",
|
"//packages/compiler/testing",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/platform-browser",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
|
@ -12,7 +12,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/platform-browser/animations",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/animations",
|
"//packages/animations",
|
||||||
"//packages/animations/browser",
|
"//packages/animations/browser",
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/platform-browser/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/core/testing",
|
"//packages/core/testing",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/platform-server",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/animations/browser",
|
"//packages/animations/browser",
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/platform-server/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/platform-browser-dynamic/testing",
|
"//packages/platform-browser-dynamic/testing",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/platform-webworker-dynamic",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/platform-webworker",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages:types",
|
"//packages:types",
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/router",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -7,7 +7,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||||||
ng_module(
|
ng_module(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/router/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
"//packages/common/testing",
|
"//packages/common/testing",
|
||||||
|
@ -12,7 +12,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/router/upgrade",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -10,7 +10,6 @@ ng_module(
|
|||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/service-worker",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/common",
|
"//packages/common",
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
|
@ -10,6 +10,5 @@ ng_module(
|
|||||||
"*.ts",
|
"*.ts",
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
]),
|
]),
|
||||||
module_name = "@angular/service-worker/config",
|
|
||||||
deps = ["//packages/core"],
|
deps = ["//packages/core"],
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,6 @@ ng_module(
|
|||||||
name = "testing",
|
name = "testing",
|
||||||
testonly = True,
|
testonly = True,
|
||||||
srcs = glob(["**/*.ts"]),
|
srcs = glob(["**/*.ts"]),
|
||||||
module_name = "@angular/service-worker/testing",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"@rxjs",
|
"@rxjs",
|
||||||
|
@ -11,7 +11,6 @@ ng_module(
|
|||||||
"src/dynamic/**/*.ts",
|
"src/dynamic/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/upgrade",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/platform-browser",
|
"//packages/platform-browser",
|
||||||
|
@ -15,7 +15,6 @@ ng_module(
|
|||||||
"src/static/**/*.ts",
|
"src/static/**/*.ts",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
module_name = "@angular/upgrade/static",
|
|
||||||
deps = [
|
deps = [
|
||||||
"//packages/core",
|
"//packages/core",
|
||||||
"//packages/platform-browser",
|
"//packages/platform-browser",
|
||||||
|
@ -44,7 +44,38 @@ PKG_GROUP_REPLACEMENTS = {
|
|||||||
]""" % ",\n ".join(["\"%s\"" % s for s in ANGULAR_SCOPED_PACKAGES]),
|
]""" % ",\n ".join(["\"%s\"" % s for s in ANGULAR_SCOPED_PACKAGES]),
|
||||||
}
|
}
|
||||||
|
|
||||||
def ts_library(tsconfig = None, testonly = False, deps = [], **kwargs):
|
def _default_module_name(testonly):
|
||||||
|
""" Provide better defaults for package names.
|
||||||
|
|
||||||
|
e.g. rather than angular/packages/core/testing we want @angular/core/testing
|
||||||
|
|
||||||
|
TODO(alexeagle): we ought to supply a default module name for every library in the repo.
|
||||||
|
But we short-circuit below in cases that are currently not working.
|
||||||
|
"""
|
||||||
|
pkg = native.package_name()
|
||||||
|
|
||||||
|
if testonly:
|
||||||
|
# Some tests currently rely on the long-form package names
|
||||||
|
return None
|
||||||
|
|
||||||
|
if pkg.startswith("packages/bazel"):
|
||||||
|
# Avoid infinite recursion in the ViewEngine compiler. Error looks like:
|
||||||
|
# Compiling Angular templates (ngc) //packages/bazel/test/ngc-wrapped/empty:empty failed (Exit 1)
|
||||||
|
# : RangeError: Maximum call stack size exceeded
|
||||||
|
# at normalizeString (path.js:57:25)
|
||||||
|
# at Object.normalize (path.js:1132:12)
|
||||||
|
# at Object.join (path.js:1167:18)
|
||||||
|
# at resolveModule (execroot/angular/bazel-out/host/bin/packages/bazel/src/ngc-wrapped/ngc-wrapped.runfiles/angular/packages/compiler-cli/src/metadata/bundler.js:582:50)
|
||||||
|
# at MetadataBundler.exportAll (execroot/angular/bazel-out/host/bin/packages/bazel/src/ngc-wrapped/ngc-wrapped.runfiles/angular/packages/compiler-cli/src/metadata/bundler.js:119:42)
|
||||||
|
# at MetadataBundler.exportAll (execroot/angular/bazel-out/host/bin/packages/bazel/src/ngc-wrapped/ngc-wrapped.runfiles/angular/packages/compiler-cli/src/metadata/bundler.js:121:52)
|
||||||
|
return None
|
||||||
|
|
||||||
|
if pkg.startswith("packages/"):
|
||||||
|
return "@angular/" + pkg[len("packages/"):]
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def ts_library(tsconfig = None, testonly = False, deps = [], module_name = None, **kwargs):
|
||||||
"""Default values for ts_library"""
|
"""Default values for ts_library"""
|
||||||
deps = deps + ["@ngdeps//tslib"]
|
deps = deps + ["@ngdeps//tslib"]
|
||||||
if testonly:
|
if testonly:
|
||||||
@ -57,15 +88,19 @@ def ts_library(tsconfig = None, testonly = False, deps = [], **kwargs):
|
|||||||
else:
|
else:
|
||||||
tsconfig = _DEFAULT_TSCONFIG_BUILD
|
tsconfig = _DEFAULT_TSCONFIG_BUILD
|
||||||
|
|
||||||
|
if not module_name:
|
||||||
|
module_name = _default_module_name(testonly)
|
||||||
|
|
||||||
_ts_library(
|
_ts_library(
|
||||||
tsconfig = tsconfig,
|
tsconfig = tsconfig,
|
||||||
testonly = testonly,
|
testonly = testonly,
|
||||||
deps = deps,
|
deps = deps,
|
||||||
node_modules = _DEFAULT_TS_TYPINGS,
|
node_modules = _DEFAULT_TS_TYPINGS,
|
||||||
|
module_name = module_name,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], **kwargs):
|
def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps = [], module_name = None, **kwargs):
|
||||||
"""Default values for ng_module"""
|
"""Default values for ng_module"""
|
||||||
deps = deps + ["@ngdeps//tslib"]
|
deps = deps + ["@ngdeps//tslib"]
|
||||||
if testonly:
|
if testonly:
|
||||||
@ -77,6 +112,8 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps
|
|||||||
tsconfig = _DEFAULT_TSCONFIG_TEST
|
tsconfig = _DEFAULT_TSCONFIG_TEST
|
||||||
else:
|
else:
|
||||||
tsconfig = _DEFAULT_TSCONFIG_BUILD
|
tsconfig = _DEFAULT_TSCONFIG_BUILD
|
||||||
|
if not module_name:
|
||||||
|
module_name = _default_module_name(testonly)
|
||||||
if not entry_point:
|
if not entry_point:
|
||||||
entry_point = "public_api.ts"
|
entry_point = "public_api.ts"
|
||||||
_ng_module(
|
_ng_module(
|
||||||
@ -89,6 +126,7 @@ def ng_module(name, tsconfig = None, entry_point = None, testonly = False, deps
|
|||||||
compiler = _INTERNAL_NG_MODULE_COMPILER,
|
compiler = _INTERNAL_NG_MODULE_COMPILER,
|
||||||
ng_xi18n = _INTERNAL_NG_MODULE_XI18N,
|
ng_xi18n = _INTERNAL_NG_MODULE_XI18N,
|
||||||
node_modules = _DEFAULT_TS_TYPINGS,
|
node_modules = _DEFAULT_TS_TYPINGS,
|
||||||
|
module_name = module_name,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user