build: move repeated tsconfig attributes to a macro (#20964)

This helps ensure we use the same tsconfig.json file for all compilations.
Next steps are to make it the same tsconfig.json file used by the editor

PR Close #20964
This commit is contained in:
Alex Eagle 2018-01-09 15:24:00 -08:00
parent f15ca6ce50
commit c4f02e21dd
54 changed files with 83 additions and 123 deletions

View File

@ -5,16 +5,9 @@ exports_files([
"tsconfig.json",
])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config", "ts_library")
ts_config(
name = "tsconfig",
src = ":tsconfig-build.json",
deps = [],
)
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "types",
srcs = glob(["*.ts"]),
tsconfig = ":tsconfig",
)

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "animations",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/animations",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
],

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "browser",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/animations/browser",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/animations",
],

View File

@ -1,10 +1,9 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "test",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/animations",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/animations/browser/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/animations",
"//packages/animations/browser",

View File

@ -1,10 +1,9 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "test",
testonly = 1,
srcs = glob(["test/**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/animations",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "common",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/common",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"@rxjs",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "http",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/common/http",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/core",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/common/http/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common/http",
"//packages/core",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "locales",
@ -9,7 +9,4 @@ ts_library(
exclude = ["closure-locale.ts"],
),
module_name = "@angular/common/locales",
tsconfig = "//packages:tsconfig",
deps = [
],
)

View File

@ -1,4 +1,5 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
@ -8,7 +9,6 @@ ts_library(
["**/*.ts"],
exclude = ["**/*_node_only_spec.ts"],
),
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/common/locales",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/common/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/core",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "compiler",
@ -11,5 +11,4 @@ ts_library(
],
),
module_name = "@angular/compiler",
tsconfig = "//packages:tsconfig",
)

View File

@ -1,4 +1,5 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
@ -8,7 +9,6 @@ ts_library(
["**/*.ts"],
exclude = ["**/*_node_only_spec.ts"],
),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/common",
@ -27,7 +27,6 @@ ts_library(
name = "test_node_only_lib",
testonly = 1,
srcs = glob(["**/*_node_only_spec.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
":test_lib",
"//packages/compiler",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/compiler/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/compiler",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ng_module")
ng_module(
name = "core",
@ -12,7 +11,6 @@ ng_module(
],
),
module_name = "@angular/core",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"@rxjs",

View File

@ -1,6 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
@ -13,7 +14,6 @@ ts_library(
"render3/**/*.ts",
],
),
tsconfig = "//packages:tsconfig",
deps = [
"//packages/animations",
"//packages/animations/browser",
@ -37,7 +37,6 @@ ts_library(
name = "test_node_only_lib",
testonly = 1,
srcs = glob(["**/*_node_only_spec.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
":test_lib",
"//packages/compiler",

View File

@ -1,6 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
@ -14,6 +15,7 @@ ts_library(
"load_domino.ts",
],
),
# TODO(alexeagle): should not be different tsconfig
tsconfig = "//packages:tsconfig.json",
deps = [
"//packages:types",
@ -34,7 +36,6 @@ ts_library(
"domino.d.ts",
"load_domino.ts",
],
tsconfig = "//packages:tsconfig",
deps = [
":render3_lib",
"//packages/platform-browser",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/core/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/core",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ng_module")
ng_module(
name = "forms",
@ -12,7 +11,6 @@ ng_module(
],
),
module_name = "@angular/forms",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/core/testing",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "http",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/http",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/core/testing",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/http/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/http",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "language-service",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/language-service",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/compiler",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/compiler",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "platform-browser-dynamic",
@ -12,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/platform-browser-dynamic",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/common",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/compiler",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/platform-browser-dynamic/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/compiler",
"//packages/compiler/testing",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "platform-browser",
@ -12,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/platform-browser",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/common",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "animations",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/platform-browser/animations",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/animations",
"//packages/animations/browser",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/animations",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/platform-browser/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "platform-server",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/platform-server",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/animations/browser",
"//packages/common",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/animations",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/platform-server/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/platform-browser-dynamic/testing",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "platform-webworker-dynamic",
@ -12,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/platform-webworker-dynamic",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/common",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "platform-webworker",
@ -12,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/platform-webworker",
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/common",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/platform-browser-dynamic/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/compiler",
"//packages/compiler/testing",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/compiler",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "router",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/router",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/core",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/common/testing",

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/router/testing",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/common/testing",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "service-worker",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/service-worker",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/common",
"//packages/core",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/core",

View File

@ -1,13 +1,10 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
module_name = "@angular/service-worker/testing",
tsconfig = "//packages:tsconfig",
deps = [
],
)

View File

@ -1,4 +1,4 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
@ -7,7 +7,6 @@ ts_library(
srcs = glob(
["**/*.ts"],
),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/service-worker/worker",

View File

@ -1,12 +1,11 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "testing",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/service-worker/worker",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "upgrade",
@ -11,7 +11,6 @@ ts_library(
],
),
module_name = "@angular/upgrade",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -1,12 +1,11 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "static",
srcs = glob(["**/*.ts"]),
module_name = "@angular/upgrade/static",
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -1,11 +1,11 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library(
name = "test_lib",
testonly = 1,
srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [
"//packages:types",
"//packages/core",

1
tools/BUILD.bazel Normal file
View File

@ -0,0 +1 @@
# Marker file indicating this folder is a Bazel package

15
tools/defaults.bzl Normal file
View File

@ -0,0 +1,15 @@
"""Re-export of some bazel rules with repository-wide defaults."""
load("@build_bazel_rules_typescript//:defs.bzl", _ts_library = "ts_library")
load("@angular//:index.bzl", _ng_module = "ng_module")
DEFAULT_TSCONFIG = "//packages:tsconfig-build.json"
def ts_library(tsconfig = None, **kwargs):
if not tsconfig:
tsconfig = DEFAULT_TSCONFIG
_ts_library(tsconfig = tsconfig, **kwargs)
def ng_module(tsconfig = None, **kwargs):
if not tsconfig:
tsconfig = DEFAULT_TSCONFIG
_ng_module(tsconfig = tsconfig, **kwargs)

View File

@ -1,12 +1,11 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "browser",
testonly = 1,
srcs = ["init_browser_spec.ts"],
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core/testing",
"//packages/platform-browser-dynamic/testing",
@ -18,7 +17,6 @@ ts_library(
name = "node",
testonly = 1,
srcs = ["init_node_spec.ts"],
tsconfig = "//packages:tsconfig",
deps = [
"//packages/core/testing",
"//packages/platform-server",