Skip to content

Commit 4a97994

Browse files
committed
build: add bazel config for cdk-experimental/dialog
Adds the BUILD.bazel file for the `@angular/cdk-experimental/dialog` package for consistency with everything else and to make it easier to eventually move it into the CDK.
1 parent 9062640 commit 4a97994

File tree

5 files changed

+53
-13
lines changed

5 files changed

+53
-13
lines changed

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CDK_PACKAGES = [
2222
CDK_TARGETS = ["//src/cdk"] + ["//src/cdk/%s" % p for p in CDK_PACKAGES]
2323

2424
CDK_EXPERIMENTAL_PACKAGES = [
25-
# "dialog", # Disabled because BUILD.bazel doesn't exist yet
25+
"dialog",
2626
"scrolling",
2727
]
2828

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package(default_visibility=["//visibility:public"])
2+
load("@angular//:index.bzl", "ng_module")
3+
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library", "sass_binary")
4+
5+
6+
ng_module(
7+
name = "dialog",
8+
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
9+
module_name = "@angular/cdk-experimental/dialog",
10+
assets = [":dialog_container_css"] + glob(["**/*.html"]),
11+
deps = [
12+
"//src/cdk/a11y",
13+
"//src/cdk/bidi",
14+
"//src/cdk/keycodes",
15+
"//src/cdk/overlay",
16+
"//src/cdk/portal",
17+
],
18+
tsconfig = "//src/lib:tsconfig-build.json",
19+
)
20+
21+
# TODO(jelbourn): replace this w/ sass_library when it supports acting like a filegroup
22+
filegroup(
23+
name = "dialog_container_scss_partials",
24+
srcs = glob(["**/_*.scss"]),
25+
)
26+
27+
sass_binary(
28+
name = "dialog_container_scss",
29+
src = "dialog-container.scss",
30+
)
31+
32+
# TODO(jelbourn): remove this when sass_binary supports specifying an output filename and dir.
33+
# Copy the output of the sass_binary such that the filename and path match what we expect.
34+
genrule(
35+
name = "dialog_container_css",
36+
srcs = [":dialog_container_scss.css"],
37+
outs = ["dialog-container.css"],
38+
cmd = "cp $< $@",
39+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare var module: {id: string};

0 commit comments

Comments
 (0)