-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
92 lines (84 loc) · 2.56 KB
/
BUILD.bazel
File metadata and controls
92 lines (84 loc) · 2.56 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("//tools:defaults.bzl", "jasmine_test", "sass_binary", "ts_project")
package(default_visibility = ["//visibility:public"])
# Test theme used to ensure that our themes will compile using CSS variables in
# the palettes.
sass_binary(
name = "test-css-variables-theme",
testonly = True,
src = "test-css-variables-theme.scss",
deps = [
"//src/material/core/color",
"//src/material/core/density/private:all_density",
"//src/material/core/m2:m2_sass",
"//src/material/core/theming",
"//src/material/core/theming:core_all_theme",
"//src/material/core/typography:all_typography",
],
)
# Sass binary which is used to ensure that our themes will compile with the
# pattern for configuring themes. For more information, inspect
# the `mat-light-theme` and `mat-dark-theme` theming functions.
sass_binary(
name = "test-theming-api",
testonly = True,
src = "test-theming-api.scss",
deps = [
"//src/material/core/color",
"//src/material/core/density/private:all_density",
"//src/material/core/m2:m2_sass",
"//src/material/core/theming",
"//src/material/core/theming:core_all_theme",
"//src/material/core/typography:all_typography",
],
)
# Sass binary used to ensure that the theming bundle works as expected.
sass_binary(
name = "test-theming-bundle",
testonly = True,
src = "test-theming-bundle.scss",
deps = ["//src/material:sass_lib"],
)
# Sass binary that asserts that setting the font family for a typography config works as expected.
sass_binary(
name = "test-typography-font-family",
testonly = True,
src = "test-typography-font-family.scss",
deps = ["//src/material:sass_lib"],
)
build_test(
name = "sass_compile_tests",
targets = [
":test-css-variables-theme",
":test-theming-api",
":test-theming-bundle",
":test-typography-font-family",
],
)
ts_project(
name = "unit_test_lib",
testonly = True,
srcs = glob([
"*.spec.ts",
]),
deps = [
"//:node_modules/@bazel/runfiles",
"//:node_modules/postcss",
"//:node_modules/sass",
"//tools/postcss",
"//tools/sass:sass_lib",
],
)
jasmine_test(
name = "unit_tests",
size = "large",
data = [
":unit_test_lib",
"//src/material:sass_lib",
"//src/material-experimental:sass_lib",
],
no_copy_to_bin = [
"//src/material:sass_lib",
"//src/material-experimental:sass_lib",
],
)