forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add bazel rules for divider (angular#9096)
- Loading branch information
1 parent
55ec5ff
commit 5414480
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package(default_visibility=["//visibility:public"]) | ||
load("@angular//:index.bzl", "ng_module") | ||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_library", "sass_binary") | ||
|
||
|
||
ng_module( | ||
name = "divider", | ||
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]), | ||
module_name = "@angular/material/divider", | ||
assets = [":divider_css"], | ||
deps = [ | ||
"//src/lib/core", | ||
"//src/cdk/coercion", | ||
], | ||
tsconfig = ":tsconfig-build.json", | ||
) | ||
|
||
|
||
sass_binary( | ||
name = "divider_scss", | ||
src = "divider.scss", | ||
deps = ["//src/lib/core:core_scss_lib"], | ||
) | ||
|
||
# TODO(jelbourn): remove this when sass_binary supports specifying an output filename and dir. | ||
# Copy the output of the sass_binary such that the filename and path match what we expect. | ||
genrule( | ||
name = "divider_css", | ||
srcs = [":divider_scss"], | ||
outs = ["divider.css"], | ||
cmd = "cat $(locations :divider_scss) > $@", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters