forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
55 lines (50 loc) · 1.72 KB
/
Copy pathBUILD.bazel
File metadata and controls
55 lines (50 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package(default_visibility=["//visibility:public"])
load("//tools:sass_bundle.bzl", "sass_bundle")
load("//tools:defaults.bzl", "ng_module", "ng_package")
load("//:packages.bzl", "MATERIAL_PACKAGES", "MATERIAL_TARGETS", "MATERIAL_SCSS_LIBS",
"ROLLUP_GLOBALS")
# Root "@angular/material" entry-point.
ng_module(
name = "material",
srcs = glob(["*.ts"], exclude=["**/*.spec.ts"]),
module_name = "@angular/material",
deps = ["//src/material/%s" % p for p in MATERIAL_PACKAGES] + [
"@npm//@angular/forms",
"@npm//@angular/animations",
],
)
sass_bundle(
name = "theming_bundle",
srcs = [
"//src/cdk/a11y:a11y_scss_lib",
"//src/cdk/overlay:overlay_scss_lib",
"//src/cdk/text-field:text_field_scss_lib",
] + MATERIAL_SCSS_LIBS,
entry_point = '//src/material/core:theming/_all-theme.scss',
output_name = "_theming.scss",
)
filegroup(
name = "overviews",
srcs = ["//src/material/%s:overview" % name for name in MATERIAL_PACKAGES]
)
# Creates the @angular/material package published to npm.
ng_package(
name = "npm_package",
srcs = ["package.json"],
entry_point = "src/material/public_api.js",
entry_point_name = "material",
globals = ROLLUP_GLOBALS,
data = [
":theming_bundle",
"//src/material/prebuilt-themes:indigo-pink",
"//src/material/prebuilt-themes:deeppurple-amber",
"//src/material/prebuilt-themes:pink-bluegrey",
"//src/material/prebuilt-themes:purple-green",
],
packages = ["//src/material/schematics:npm_package"],
deps = MATERIAL_TARGETS,
# TODO(devversion): Use the npm package for publishing. Right now this is disabled because
# we build using AOT for serving & testing, but the `ng_package` rule should not include factory
# files.
tags = ["manual"],
)