Skip to content

Commit 34e6043

Browse files
committed
chore: add Bazel rule for MatDivider
1 parent 3f589cd commit 34e6043

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/lib/divider/BUILD.bazel

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 = "divider",
8+
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
9+
module_name = "@angular/material/divider",
10+
assets = [":divider_css"],
11+
deps = [
12+
"//src/lib/core",
13+
"//src/cdk/coercion",
14+
],
15+
tsconfig = ":tsconfig-build.json",
16+
)
17+
18+
19+
sass_binary(
20+
name = "divider_scss",
21+
src = "divider.scss",
22+
deps = ["//src/lib/core:core_scss_lib"],
23+
)
24+
25+
# TODO(jelbourn): remove this when sass_binary supports specifying an output filename and dir.
26+
# Copy the output of the sass_binary such that the filename and path match what we expect.
27+
genrule(
28+
name = "divider_css",
29+
srcs = [":divider_scss"],
30+
outs = ["divider.css"],
31+
cmd = "cat $(locations :divider_scss) > $@",
32+
)
33+

0 commit comments

Comments
 (0)