Skip to content

Commit 3abc111

Browse files
devversionjelbourn
authored andcommitted
build: include cdk testing entry-point in release package
1 parent 98d0326 commit 3abc111

File tree

4 files changed

+30
-13
lines changed

4 files changed

+30
-13
lines changed

packages.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ CDK_PACKAGES = [
1818
"table",
1919
"text-field",
2020
"tree",
21+
22+
# NOTE: "testing" should not be listed here as it will be treated as its own
23+
# package. This is because we don't want to include "testing the testing utilities
24+
# in the release output.
2125
]
2226

2327
# Within the CDK, only a few targets have sass libraries which need to be

src/cdk/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ ng_package(
6262
] in rerootedStyles],
6363
entry_point = ":public-api.ts",
6464
globals = ROLLUP_GLOBALS,
65-
packages = ["//src/cdk/schematics:npm_package"],
65+
packages = [
66+
"//src/cdk/schematics:npm_package",
67+
"//src/cdk/testing:npm_package",
68+
],
6669
tags = ["release-package"],
6770
deps = CDK_TARGETS,
6871
)

src/cdk/testing/BUILD.bazel

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package(default_visibility = ["//visibility:public"])
22

3+
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
34
load("//src/e2e-app:test_suite.bzl", "e2e_test_suite")
4-
load("//tools:defaults.bzl", "markdown_to_html", "ng_module", "ng_web_test_suite")
5+
load("//tools:defaults.bzl", "markdown_to_html", "ng_web_test_suite", "ts_library")
56

6-
ng_module(
7+
ts_library(
78
name = "testing",
89
srcs = glob(
910
["**/*.ts"],
@@ -14,16 +15,12 @@ ng_module(
1415
module_name = "@angular/cdk/testing",
1516
)
1617

17-
ng_web_test_suite(
18-
name = "unit_tests",
19-
deps = ["//src/cdk/testing/tests:unit_test_sources"],
20-
)
21-
22-
e2e_test_suite(
23-
name = "e2e_tests",
18+
npm_package(
19+
name = "npm_package",
2420
deps = [
25-
"//src/cdk/testing/tests:e2e_test_sources",
26-
"@npm//protractor",
21+
":testing",
22+
"//src/cdk/testing/protractor",
23+
"//src/cdk/testing/testbed",
2724
],
2825
)
2926

@@ -36,3 +33,16 @@ filegroup(
3633
name = "source-files",
3734
srcs = glob(["**/*.ts"]),
3835
)
36+
37+
ng_web_test_suite(
38+
name = "unit_tests",
39+
deps = ["//src/cdk/testing/tests:unit_test_sources"],
40+
)
41+
42+
e2e_test_suite(
43+
name = "e2e_tests",
44+
deps = [
45+
"//src/cdk/testing/tests:e2e_test_sources",
46+
"@npm//protractor",
47+
],
48+
)

src/material-experimental/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package(default_visibility = ["//visibility:public"])
22

3-
load("//:packages.bzl", "ROLLUP_GLOBALS", "MATERIAL_EXPERIMENTAL_TARGETS")
3+
load("//:packages.bzl", "MATERIAL_EXPERIMENTAL_TARGETS", "ROLLUP_GLOBALS")
44
load("//tools:defaults.bzl", "ng_module", "ng_package")
55

66
exports_files(["mdc_require_config.js"])

0 commit comments

Comments
 (0)