mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: add bazel rules for divider (#9096)
This commit is contained in:
@@ -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) > $@",
|
||||
)
|
||||
@@ -10,6 +10,7 @@ ng_module(
|
||||
assets = [":list_css"],
|
||||
deps = [
|
||||
"//src/lib/core",
|
||||
"//src/lib/divider",
|
||||
"//src/cdk/a11y",
|
||||
"//src/cdk/coercion",
|
||||
"//src/cdk/collections",
|
||||
|
||||
Reference in New Issue
Block a user