Skip to content

Commit 5414480

Browse files
CaerusKarujosephperrott
authored andcommitted
build: add bazel rules for divider (#9096)
1 parent 55ec5ff commit 5414480

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/lib/divider/BUILD.bazel

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
)

src/lib/list/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ ng_module(
1010
assets = [":list_css"],
1111
deps = [
1212
"//src/lib/core",
13+
"//src/lib/divider",
1314
"//src/cdk/a11y",
1415
"//src/cdk/coercion",
1516
"//src/cdk/collections",

0 commit comments

Comments
 (0)