Skip to content

Commit

Permalink
build: switch coercion and keycodes entry-point to ng_module
Browse files Browse the repository at this point in the history
We can't use "ts_library" for entry-points which should be part
of a "ng_package". This is because "ng_package" currently only
partially includes "ts_library" targets in the package (i.e. missing
`package.json` file for secondary entry-points).

Until we figure out what best practice is, or if angular/angular#32610
is merged, we just use "ng_module" to work around this issue.
  • Loading branch information
devversion committed Sep 17, 2019
1 parent 2dd5772 commit d438d1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/cdk/coercion/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "karma_web_test_suite", "markdown_to_html", "ts_library")
load("//tools:defaults.bzl", "karma_web_test_suite", "markdown_to_html", "ng_module", "ts_library")

ts_library(
ng_module(
name = "coercion",
srcs = glob(
["**/*.ts"],
exclude = ["**/*.spec.ts"],
),
module_name = "@angular/cdk/coercion",
deps = [
"@npm//@angular/core",
],
)

ts_library(
Expand Down
4 changes: 2 additions & 2 deletions src/cdk/keycodes/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "karma_web_test_suite", "markdown_to_html", "ts_library")
load("//tools:defaults.bzl", "karma_web_test_suite", "markdown_to_html", "ng_module", "ts_library")

ts_library(
ng_module(
name = "keycodes",
srcs = glob(
["**/*.ts"],
Expand Down

0 comments on commit d438d1f

Please sign in to comment.