mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: test cdk with bazel (#13575)
* build: test cdk with bazel * Add comment for bazel tsconfig files * CDK tsconfig sync with Bazel build tsconfig
This commit is contained in:
committed by
Andrew Seguin
parent
85f04db62a
commit
d128fffcd6
@@ -0,0 +1,6 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files([
|
||||
"bazel-tsconfig-build.json",
|
||||
"bazel-tsconfig-test.json",
|
||||
])
|
||||
@@ -0,0 +1,30 @@
|
||||
// TypeScript configuration that will be used to build entry-points of the CDK. To avoid
|
||||
// duplicate logic, we decided to just have one package-wide tsconfig file that will be
|
||||
// used by Bazel to build the sources for an entry-point. This means that we no longer
|
||||
// need multiple tsconfig files (build & test) for each entry-point once Bazel replaces
|
||||
// our gulp build system.
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": false,
|
||||
"experimentalDecorators": true,
|
||||
"noUnusedParameters": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitAny": true,
|
||||
"importHelpers": true,
|
||||
"newLine": "lf",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es2015",
|
||||
"lib": ["es2015", "dom"],
|
||||
"skipLibCheck": true,
|
||||
"types": ["tslib"]
|
||||
},
|
||||
"bazelOptions": {
|
||||
"suppressTsconfigOverrideWarnings": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// TypeScript configuration that will be used to build the test sources for entry-points
|
||||
// of the CDK. To avoid duplicate logic, we decided to just have one package-wide tsconfig
|
||||
// file that will be used by Bazel to build the test sources for an entry-point.
|
||||
{
|
||||
"extends": "./bazel-tsconfig-build.json",
|
||||
"compilerOptions": {
|
||||
"importHelpers": false,
|
||||
"types": ["jasmine"]
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -26,5 +26,8 @@ ng_package(
|
||||
globals = ROLLUP_GLOBALS,
|
||||
replacements = VERSION_PLACEHOLDER_REPLACEMENTS,
|
||||
deps = CDK_TARGETS,
|
||||
tags = ["publish"],
|
||||
# TODO(devversion): Use the npm package for publishing. Right now this is disabled because
|
||||
# we build using AOT for serving & testing, but the `ng_package` rule should not include factory
|
||||
# files.
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
+10
-25
@@ -1,8 +1,7 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library")
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "a11y",
|
||||
@@ -17,8 +16,7 @@ ng_module(
|
||||
"//src/cdk/keycodes",
|
||||
"//src/cdk/observers",
|
||||
"//src/cdk/platform",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
]
|
||||
)
|
||||
|
||||
# TODO(jelbourn): remove this when sass_library acts like a filegroup
|
||||
@@ -32,35 +30,22 @@ sass_library(
|
||||
srcs = [":a11y_scss_partials"],
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "a11y_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":a11y",
|
||||
"@angular//packages/platform-browser",
|
||||
"@rxjs",
|
||||
"@rxjs//operators",
|
||||
"//src/cdk/keycodes",
|
||||
"//src/cdk/observers",
|
||||
"//src/cdk/platform",
|
||||
"//src/cdk/testing",
|
||||
"@rxjs",
|
||||
"@rxjs//operators",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
":a11y",
|
||||
]
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
# TODO(mmalerba): re-enable once ngfactory issue is resolved.
|
||||
tags = ["manual"],
|
||||
bootstrap = [
|
||||
"//:web_test_bootstrap_scripts",
|
||||
],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":a11y_test_sources",
|
||||
],
|
||||
deps = [":a11y_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ts_library", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "accordion",
|
||||
@@ -12,30 +11,20 @@ ng_module(
|
||||
"@rxjs",
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/collections",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
]
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "accordion_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
"@angular//packages/platform-browser",
|
||||
"@angular//packages/platform-browser/animations",
|
||||
":accordion",
|
||||
"@rxjs",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
]
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":accordion_test_sources",
|
||||
],
|
||||
deps = [":accordion_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "bidi",
|
||||
@@ -10,29 +9,19 @@ ng_module(
|
||||
deps = [
|
||||
"@angular//packages/common",
|
||||
"@angular//packages/core",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
]
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "bidi_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [":bidi"],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
deps = [
|
||||
"@angular//packages/platform-browser",
|
||||
":bidi"
|
||||
],
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = [
|
||||
"//:web_test_bootstrap_scripts",
|
||||
],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":bidi_test_sources",
|
||||
],
|
||||
deps = [":bidi_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ts_library", "jasmine_node_test")
|
||||
|
||||
ts_library(
|
||||
name = "coercion",
|
||||
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
|
||||
module_name = "@angular/cdk/coercion",
|
||||
deps = ["@npm//tslib"],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "coercion_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [":coercion"],
|
||||
deps = [
|
||||
"@npm//@types/jasmine",
|
||||
":coercion"
|
||||
],
|
||||
testonly = 1,
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
jasmine_node_test(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
deps = [":coercion_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ts_library", "jasmine_node_test")
|
||||
|
||||
ng_module(
|
||||
name = "collections",
|
||||
@@ -11,29 +10,19 @@ ng_module(
|
||||
"@angular//packages/core",
|
||||
"@rxjs"
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "collections_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":collections",
|
||||
"@rxjs",
|
||||
"@npm//@types/jasmine",
|
||||
":collections"
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
testonly = 1,
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
jasmine_node_test(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":collections_test_sources",
|
||||
],
|
||||
deps = [":collections_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "drag-drop",
|
||||
@@ -18,35 +17,19 @@ ng_module(
|
||||
"//src/cdk/bidi",
|
||||
"//src/cdk/coercion",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
|
||||
ts_library(
|
||||
name = "drag_and_drop_test_sources",
|
||||
testonly = 1,
|
||||
ng_test_library(
|
||||
name = "drag-drop_test_sources",
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":drag-drop",
|
||||
"//src/cdk/testing",
|
||||
"//src/cdk/bidi",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
":drag-drop",
|
||||
]
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = [
|
||||
"//:web_test_bootstrap_scripts",
|
||||
],
|
||||
tags = ["manual"],
|
||||
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":drag_and_drop_test_sources",
|
||||
],
|
||||
deps = [":drag-drop_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,11 +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 = "keycodes",
|
||||
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
|
||||
module_name = "@angular/cdk/keycodes",
|
||||
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
|
||||
deps = ["@npm//tslib"],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "layout",
|
||||
@@ -14,30 +13,18 @@ ng_module(
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/platform",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "layout_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":layout",
|
||||
"//src/cdk/platform",
|
||||
"@rxjs",
|
||||
":layout",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":layout_test_sources",
|
||||
],
|
||||
deps = [":layout_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "observers",
|
||||
@@ -13,29 +12,15 @@ ng_module(
|
||||
"@rxjs//operators",
|
||||
"//src/cdk/coercion",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "observers_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":observers",
|
||||
"@rxjs",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
deps = [":observers"],
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":observers_test_sources",
|
||||
],
|
||||
deps = [":observers_test_sources"],
|
||||
)
|
||||
|
||||
+13
-25
@@ -1,8 +1,7 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library")
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "overlay",
|
||||
@@ -20,7 +19,6 @@ ng_module(
|
||||
"//src/cdk/portal",
|
||||
"//src/cdk/scrolling",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
# TODO(jelbourn): replace this w/ sass_library when it supports acting like a filegroup
|
||||
@@ -34,39 +32,29 @@ sass_library(
|
||||
srcs = [":overlay_scss_partials"],
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "overlay_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":overlay",
|
||||
"@angular//packages/common",
|
||||
"@angular//packages/common/testing",
|
||||
"@angular//packages/platform-browser",
|
||||
"@rxjs",
|
||||
"@rxjs//operators",
|
||||
"//src/cdk/bidi",
|
||||
"//src/cdk/keycodes",
|
||||
"//src/cdk/platform",
|
||||
"//src/cdk/portal",
|
||||
"//src/cdk/scrolling",
|
||||
"//src/cdk/testing",
|
||||
"@rxjs",
|
||||
"@rxjs//operators",
|
||||
":overlay",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
# TODO(jelbourn): re-enable this when we can specify browser flags
|
||||
# in order to fix the window size.
|
||||
tags = ["manual"],
|
||||
bootstrap = [
|
||||
"//:web_test_bootstrap_scripts",
|
||||
],
|
||||
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":overlay_test_sources",
|
||||
],
|
||||
deps = [":overlay_test_sources"],
|
||||
# TODO(devversion): Disabling this test until we found a way to set the screen resolution
|
||||
# of the web test instance. Currently all positioning tests are not passing.
|
||||
tags = ["manual"]
|
||||
)
|
||||
|
||||
@@ -9,6 +9,5 @@ ng_module(
|
||||
deps = [
|
||||
"@angular//packages/common",
|
||||
"@angular//packages/core",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "portal",
|
||||
@@ -10,26 +9,18 @@ ng_module(
|
||||
deps = [
|
||||
"@angular//packages/core",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "portal_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [":portal"],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":portal_test_sources",
|
||||
"@angular//packages/common",
|
||||
":portal",
|
||||
],
|
||||
)
|
||||
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
deps = [":portal_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "scrolling",
|
||||
@@ -18,7 +17,6 @@ ng_module(
|
||||
"//src/cdk/collections",
|
||||
"//src/cdk/platform",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
sass_binary(
|
||||
@@ -26,31 +24,19 @@ sass_binary(
|
||||
src = "virtual-scroll-viewport.scss",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "scrolling_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":scrolling",
|
||||
"@rxjs",
|
||||
"//src/cdk/bidi",
|
||||
"//src/cdk/collections",
|
||||
"//src/cdk/testing",
|
||||
"@rxjs",
|
||||
":scrolling",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = [
|
||||
"//:web_test_bootstrap_scripts",
|
||||
],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":scrolling_test_sources",
|
||||
],
|
||||
deps = [":scrolling_test_sources"],
|
||||
)
|
||||
|
||||
@@ -17,5 +17,4 @@ ng_module(
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/keycodes",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "table",
|
||||
@@ -17,32 +16,21 @@ ng_module(
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/platform",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "table_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":table",
|
||||
"@rxjs",
|
||||
"@rxjs//operators",
|
||||
"//src/cdk/bidi",
|
||||
"//src/cdk/collections",
|
||||
"@rxjs",
|
||||
"@rxjs//operators"
|
||||
":table",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":table_test_sources",
|
||||
],
|
||||
deps = [":table_test_sources"],
|
||||
)
|
||||
|
||||
@@ -6,7 +6,6 @@ ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
|
||||
module_name = "@angular/cdk/testing",
|
||||
tsconfig = ":tsconfig-bazel.json",
|
||||
deps = [
|
||||
"@angular//packages/core",
|
||||
],
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
// This file exists to be consumed by Bazel
|
||||
// Note that there is no build tsconfig because the cdk/testing entry-point is internal-only.
|
||||
{
|
||||
"extends": "../tsconfig-build",
|
||||
"files": [
|
||||
"public-api.ts",
|
||||
"../typings.d.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"strictMetadataEmit": true,
|
||||
"flatModuleOutFile": "index.js",
|
||||
"flatModuleId": "@angular/cdk/testing",
|
||||
"skipTemplateCodegen": true
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library", "sass_binary")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "text-field",
|
||||
@@ -14,7 +14,6 @@ ng_module(
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/platform",
|
||||
],
|
||||
tsconfig = "//src/lib:tsconfig-build.json",
|
||||
)
|
||||
|
||||
# TODO(jelbourn): replace this w/ sass_library when it supports acting like a filegroup
|
||||
@@ -33,3 +32,25 @@ sass_binary(
|
||||
src = "text-field-prebuilt.scss",
|
||||
deps = [":text_field_scss_lib"],
|
||||
)
|
||||
|
||||
ng_test_library(
|
||||
name = "text-field_test_sources",
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
"@angular//packages/forms",
|
||||
"@angular//packages/platform-browser",
|
||||
"@angular//packages/platform-browser/animations",
|
||||
"@rxjs",
|
||||
"//src/cdk/platform",
|
||||
"//src/cdk/testing",
|
||||
":text-field"
|
||||
],
|
||||
)
|
||||
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
deps = [":text-field_test_sources"],
|
||||
# TODO(devversion): Disabling this test until we found a way to set the screen resolution
|
||||
# of the web test instance. Currently all positioning tests are not passing.
|
||||
tags = ["manual"],
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package(default_visibility=["//visibility:public"])
|
||||
|
||||
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_web_test")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite")
|
||||
|
||||
ng_module(
|
||||
name = "tree",
|
||||
@@ -17,33 +16,20 @@ ng_module(
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/collections",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
ng_test_library(
|
||||
name = "tree_test_sources",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.spec.ts"]),
|
||||
deps = [
|
||||
":tree",
|
||||
"//src/cdk/collections",
|
||||
"@rxjs",
|
||||
"@rxjs//operators",
|
||||
"//src/cdk/collections",
|
||||
":tree",
|
||||
],
|
||||
tsconfig = "//src/cdk:tsconfig-build.json",
|
||||
)
|
||||
|
||||
ts_web_test(
|
||||
ng_web_test_suite(
|
||||
name = "unit_tests",
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"],
|
||||
# TODO(tinagao): get these tests passing
|
||||
tags = ["manual"],
|
||||
# Do not sort
|
||||
deps = [
|
||||
"//:tslib_bundle",
|
||||
"//:angular_bundles",
|
||||
"//:angular_test_bundles",
|
||||
"//test:angular_test_init",
|
||||
":tree_test_sources",
|
||||
],
|
||||
deps = [":tree_test_sources"],
|
||||
)
|
||||
|
||||
@@ -1,30 +1,17 @@
|
||||
// TypeScript config file that is used to compile the cdk's ES2015 package.
|
||||
// TypeScript config file that is used to compile the cdk's ES2015 package through Gulp. As the
|
||||
// long term goal is to switch to Bazel, and we already want to run tests with Bazel, we need to
|
||||
// ensure the TypeScript build options are the same for Gulp and Bazel. We archive this by
|
||||
// extending the generic Bazel build tsconfig which will be used for each entry-point.
|
||||
{
|
||||
"extends": "../bazel-tsconfig-build.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": false,
|
||||
"experimentalDecorators": true,
|
||||
"noUnusedParameters": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitAny": true,
|
||||
"importHelpers": true,
|
||||
"newLine": "lf",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../dist/packages/cdk",
|
||||
"rootDir": ".",
|
||||
"rootDirs": [
|
||||
".",
|
||||
"../../dist/packages/cdk"
|
||||
],
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es2015",
|
||||
"lib": ["es2015", "dom"],
|
||||
"skipLibCheck": true,
|
||||
"types": ["tslib"],
|
||||
"paths": {
|
||||
"@angular/cdk/*": ["../../dist/packages/cdk/*"]
|
||||
}
|
||||
@@ -40,8 +27,5 @@
|
||||
"flatModuleId": "@angular/cdk",
|
||||
"skipTemplateCodegen": true,
|
||||
"fullTemplateTypeCheck": true
|
||||
},
|
||||
"bazelOptions": {
|
||||
"suppressTsconfigOverrideWarnings": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// Unset options inherited from tsconfig-build
|
||||
"annotateForClosureCompiler": false,
|
||||
"flatModuleOutFile": null,
|
||||
"flatModuleId": null,
|
||||
"flatModuleId": null
|
||||
},
|
||||
"include": [
|
||||
// Include the index.ts for each secondary entry-point
|
||||
|
||||
Reference in New Issue
Block a user