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", "tsconfig.json",
]) ])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_config(
name = "tsconfig",
src = ":tsconfig-build.json",
deps = [],
)
ts_library( ts_library(
name = "types", name = "types",
srcs = glob(["*.ts"]), srcs = glob(["*.ts"]),
tsconfig = ":tsconfig",
) )

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "browser", name = "browser",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/animations/browser", module_name = "@angular/animations/browser",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/animations", "//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( ts_library(
name = "test", name = "test",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/animations", "//packages/animations",

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "locales", name = "locales",
@ -9,7 +9,4 @@ ts_library(
exclude = ["closure-locale.ts"], exclude = ["closure-locale.ts"],
), ),
module_name = "@angular/common/locales", 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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
@ -8,7 +9,6 @@ ts_library(
["**/*.ts"], ["**/*.ts"],
exclude = ["**/*_node_only_spec.ts"], exclude = ["**/*_node_only_spec.ts"],
), ),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/common", "//packages/common",
"//packages/common/locales", "//packages/common/locales",

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "compiler", name = "compiler",
@ -11,5 +11,4 @@ ts_library(
], ],
), ),
module_name = "@angular/compiler", 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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
@ -8,7 +9,6 @@ ts_library(
["**/*.ts"], ["**/*.ts"],
exclude = ["**/*_node_only_spec.ts"], exclude = ["**/*_node_only_spec.ts"],
), ),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/common", "//packages/common",
@ -27,7 +27,6 @@ ts_library(
name = "test_node_only_lib", name = "test_node_only_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*_node_only_spec.ts"]), srcs = glob(["**/*_node_only_spec.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
":test_lib", ":test_lib",
"//packages/compiler", "//packages/compiler",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module") load("//tools:defaults.bzl", "ng_module")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
ng_module( ng_module(
name = "forms", name = "forms",
@ -12,7 +11,6 @@ ng_module(
], ],
), ),
module_name = "@angular/forms", module_name = "@angular/forms",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core", "//packages/core",
"//packages/platform-browser", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core", "//packages/core",
"//packages/core/testing", "//packages/core/testing",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "http", name = "http",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/http", module_name = "@angular/http",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core", "//packages/core",
"//packages/platform-browser", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core", "//packages/core",
"//packages/core/testing", "//packages/core/testing",

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "language-service", name = "language-service",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/language-service", module_name = "@angular/language-service",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/compiler", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/compiler", "//packages/compiler",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module") load("//tools:defaults.bzl", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
ts_library( ts_library(
name = "platform-browser-dynamic", name = "platform-browser-dynamic",
@ -12,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/platform-browser-dynamic", module_name = "@angular/platform-browser-dynamic",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/common", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/compiler", "//packages/compiler",

View File

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

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "animations", name = "animations",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/platform-browser/animations", module_name = "@angular/platform-browser/animations",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/animations", "//packages/animations",
"//packages/animations/browser", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/animations", "//packages/animations",

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "platform-server", name = "platform-server",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/platform-server", module_name = "@angular/platform-server",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/animations/browser", "//packages/animations/browser",
"//packages/common", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/animations", "//packages/animations",

View File

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

View File

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

View File

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

View File

@ -1,13 +1,12 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "testing", name = "testing",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
module_name = "@angular/platform-browser-dynamic/testing", module_name = "@angular/platform-browser-dynamic/testing",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/compiler", "//packages/compiler",
"//packages/compiler/testing", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/compiler", "//packages/compiler",

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "router", name = "router",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/router", module_name = "@angular/router",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/common", "//packages/common",
"//packages/core", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/common", "//packages/common",
"//packages/common/testing", "//packages/common/testing",

View File

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

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "service-worker", name = "service-worker",
@ -11,7 +11,6 @@ ts_library(
], ],
), ),
module_name = "@angular/service-worker", module_name = "@angular/service-worker",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/common", "//packages/common",
"//packages/core", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/core", "//packages/core",

View File

@ -1,13 +1,10 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "testing", name = "testing",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
module_name = "@angular/service-worker/testing", 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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
@ -7,7 +7,6 @@ ts_library(
srcs = glob( srcs = glob(
["**/*.ts"], ["**/*.ts"],
), ),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/service-worker/worker", "//packages/service-worker/worker",

View File

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

View File

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

View File

@ -1,12 +1,11 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "static", name = "static",
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
module_name = "@angular/upgrade/static", module_name = "@angular/upgrade/static",
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core", "//packages/core",
"//packages/platform-browser", "//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") load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
ts_library( ts_library(
name = "test_lib", name = "test_lib",
testonly = 1, testonly = 1,
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages:types", "//packages:types",
"//packages/core", "//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"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "browser", name = "browser",
testonly = 1, testonly = 1,
srcs = ["init_browser_spec.ts"], srcs = ["init_browser_spec.ts"],
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core/testing", "//packages/core/testing",
"//packages/platform-browser-dynamic/testing", "//packages/platform-browser-dynamic/testing",
@ -18,7 +17,6 @@ ts_library(
name = "node", name = "node",
testonly = 1, testonly = 1,
srcs = ["init_node_spec.ts"], srcs = ["init_node_spec.ts"],
tsconfig = "//packages:tsconfig",
deps = [ deps = [
"//packages/core/testing", "//packages/core/testing",
"//packages/platform-server", "//packages/platform-server",