Skip to content

Commit c923002

Browse files
committed
refactor: create individual BUILD files in core
1 parent d9970db commit c923002

File tree

68 files changed

+2942
-1080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2942
-1080
lines changed

src/e2e-app/BUILD.bazel

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
load("//tools:defaults.bzl", "devmode_esbuild", "esbuild_config", "http_server", "sass_binary")
21
load("//src/components-examples:config.bzl", "ALL_EXAMPLES")
3-
load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES")
2+
load("//tools:defaults.bzl", "devmode_esbuild", "esbuild_config", "http_server", "sass_binary")
43
load("//tools:defaults2.bzl", "ng_project")
4+
load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES")
55

66
package(default_visibility = ["//visibility:public"])
77

@@ -55,7 +55,6 @@ sass_binary(
5555
deps = [
5656
"//src/material:sass_lib",
5757
"//src/material-experimental:sass_lib",
58-
"//src/material/core:theming_scss_lib",
5958
],
6059
)
6160

src/material/BUILD.bazel

Lines changed: 133 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
load(
22
"//src/material:config.bzl",
33
"MATERIAL_ENTRYPOINTS",
4-
"MATERIAL_SCSS_LIBS",
54
"MATERIAL_TARGETS",
65
"MATERIAL_TESTING_TARGETS",
76
)
@@ -32,8 +31,72 @@ sass_library(
3231
"_index.scss",
3332
],
3433
deps = [
35-
"//src/material/core:core_scss_lib",
36-
"//src/material/core:theming_scss_lib",
34+
"//src/material/autocomplete:theme",
35+
"//src/material/badge:theme",
36+
"//src/material/bottom-sheet:theme",
37+
"//src/material/button:fab_theme",
38+
"//src/material/button:icon_button_theme",
39+
"//src/material/button:theme",
40+
"//src/material/button-toggle:theme",
41+
"//src/material/card:theme",
42+
"//src/material/checkbox:theme",
43+
"//src/material/chips:theme",
44+
"//src/material/core:core_sass",
45+
"//src/material/core:ripple_sass",
46+
"//src/material/core:ripple_sass_theme",
47+
"//src/material/core:theme_sass",
48+
"//src/material/core/color",
49+
"//src/material/core/density/private:all_density",
50+
"//src/material/core/focus-indicators",
51+
"//src/material/core/m2:m2_sass",
52+
"//src/material/core/option:theme",
53+
"//src/material/core/selection/pseudo-checkbox:_pseudo_checkbox_common",
54+
"//src/material/core/selection/pseudo-checkbox:sass_theme",
55+
"//src/material/core/style:_validation",
56+
"//src/material/core/style:elevation",
57+
"//src/material/core/style:private",
58+
"//src/material/core/style:sass_utils",
59+
"//src/material/core/style:variables",
60+
"//src/material/core/style:vendor_prefixes",
61+
"//src/material/core/theming",
62+
"//src/material/core/theming:_color_api_backwards_compatibility",
63+
"//src/material/core/theming:_definition",
64+
"//src/material/core/theming:_inspection",
65+
"//src/material/core/theming:_palettes",
66+
"//src/material/core/theming:core_all_theme",
67+
"//src/material/core/tokens:m3_system",
68+
"//src/material/core/tokens/m2",
69+
"//src/material/core/typography",
70+
"//src/material/core/typography:all_typography",
71+
"//src/material/core/typography:utils",
72+
"//src/material/datepicker:theme",
73+
"//src/material/dialog:dialog_legacy_padding",
74+
"//src/material/dialog:theme",
75+
"//src/material/divider:theme",
76+
"//src/material/expansion:theme",
77+
"//src/material/form-field:theme",
78+
"//src/material/grid-list:theme",
79+
"//src/material/icon:theme",
80+
"//src/material/input:theme",
81+
"//src/material/list:theme",
82+
"//src/material/menu:theme",
83+
"//src/material/paginator:theme",
84+
"//src/material/progress-bar:theme",
85+
"//src/material/progress-spinner:theme",
86+
"//src/material/radio:theme",
87+
"//src/material/select:theme",
88+
"//src/material/sidenav:theme",
89+
"//src/material/slide-toggle:theme",
90+
"//src/material/slider:theme",
91+
"//src/material/snack-bar:theme",
92+
"//src/material/sort:theme",
93+
"//src/material/stepper:theme",
94+
"//src/material/table:theme",
95+
"//src/material/tabs:theme",
96+
"//src/material/timepicker:theme",
97+
"//src/material/toolbar:theme",
98+
"//src/material/tooltip:theme",
99+
"//src/material/tree:theme",
37100
],
38101
)
39102

@@ -43,7 +106,56 @@ ng_package(
43106
srcs = [
44107
"package.json",
45108
":sass_lib",
46-
"//src/material/core:theming_scss_lib",
109+
"//src/material/autocomplete:theme",
110+
"//src/material/badge:theme",
111+
"//src/material/bottom-sheet:theme",
112+
"//src/material/button:fab_theme",
113+
"//src/material/button:icon_button_theme",
114+
"//src/material/button:theme",
115+
"//src/material/button-toggle:theme",
116+
"//src/material/card:theme",
117+
"//src/material/checkbox:theme",
118+
"//src/material/chips:theme",
119+
"//src/material/core:core_sass",
120+
"//src/material/core:ripple_sass",
121+
"//src/material/core:ripple_sass_theme",
122+
"//src/material/core:theme_sass",
123+
"//src/material/core/color",
124+
"//src/material/core/density/private:all_density",
125+
"//src/material/core/focus-indicators",
126+
"//src/material/core/m2:m2_sass",
127+
"//src/material/core/option:theme",
128+
"//src/material/core/selection/pseudo-checkbox:_pseudo_checkbox_common",
129+
"//src/material/core/selection/pseudo-checkbox:sass_theme",
130+
"//src/material/core/style:_validation",
131+
"//src/material/core/style:elevation",
132+
"//src/material/core/style:private",
133+
"//src/material/core/style:sass_utils",
134+
"//src/material/core/style:variables",
135+
"//src/material/core/style:vendor_prefixes",
136+
"//src/material/core/theming",
137+
"//src/material/core/theming:_color_api_backwards_compatibility",
138+
"//src/material/core/theming:_definition",
139+
"//src/material/core/theming:_inspection",
140+
"//src/material/core/theming:_palettes",
141+
"//src/material/core/theming:core_all_theme",
142+
"//src/material/core/tokens:m3_system",
143+
"//src/material/core/tokens/m2",
144+
"//src/material/core/typography",
145+
"//src/material/core/typography:all_typography",
146+
"//src/material/core/typography:utils",
147+
"//src/material/datepicker:theme",
148+
"//src/material/dialog:dialog_legacy_padding",
149+
"//src/material/dialog:theme",
150+
"//src/material/divider:theme",
151+
"//src/material/expansion:theme",
152+
"//src/material/form-field:theme",
153+
"//src/material/grid-list:theme",
154+
"//src/material/icon:theme",
155+
"//src/material/input:theme",
156+
"//src/material/list:theme",
157+
"//src/material/menu:theme",
158+
"//src/material/paginator:theme",
47159
"//src/material/prebuilt-themes:azure-blue",
48160
"//src/material/prebuilt-themes:cyan-orange",
49161
"//src/material/prebuilt-themes:deeppurple-amber",
@@ -52,7 +164,23 @@ ng_package(
52164
"//src/material/prebuilt-themes:pink-bluegrey",
53165
"//src/material/prebuilt-themes:purple-green",
54166
"//src/material/prebuilt-themes:rose-red",
55-
] + MATERIAL_SCSS_LIBS,
167+
"//src/material/progress-bar:theme",
168+
"//src/material/progress-spinner:theme",
169+
"//src/material/radio:theme",
170+
"//src/material/select:theme",
171+
"//src/material/sidenav:theme",
172+
"//src/material/slide-toggle:theme",
173+
"//src/material/slider:theme",
174+
"//src/material/snack-bar:theme",
175+
"//src/material/sort:theme",
176+
"//src/material/stepper:theme",
177+
"//src/material/table:theme",
178+
"//src/material/tabs:theme",
179+
"//src/material/timepicker:theme",
180+
"//src/material/toolbar:theme",
181+
"//src/material/tooltip:theme",
182+
"//src/material/tree:theme",
183+
],
56184
nested_packages = ["//src/material/schematics:npm_package"],
57185
tags = ["release-package"],
58186
deps = [get_legacy_label(t) for t in MATERIAL_TARGETS + MATERIAL_TESTING_TARGETS],

src/material/autocomplete/BUILD.bazel

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,46 @@ load("//tools:defaults2.bzl", "ng_project", "ts_project")
1010

1111
package(default_visibility = ["//visibility:public"])
1212

13+
sass_library(
14+
name = "theme",
15+
srcs = [
16+
"_autocomplete-theme.scss",
17+
],
18+
deps = [
19+
"//src/material/core/style:sass_utils",
20+
"//src/material/core/theming",
21+
"//src/material/core/theming:_inspection",
22+
"//src/material/core/theming:_validation",
23+
"//src/material/core/tokens:token_utils",
24+
"//src/material/core/tokens/m2/mat",
25+
"//src/material/core/typography",
26+
],
27+
)
28+
29+
sass_binary(
30+
name = "css",
31+
src = "autocomplete.scss",
32+
deps = [
33+
"//src/cdk:sass_lib",
34+
"//src/material/core/tokens:token_utils",
35+
"//src/material/core/tokens/m2/mat",
36+
],
37+
)
38+
1339
ng_project(
1440
name = "autocomplete",
15-
srcs = glob(
16-
["**/*.ts"],
17-
exclude = [
18-
"**/*.spec.ts",
19-
],
20-
),
41+
srcs = [
42+
"autocomplete.ts",
43+
"autocomplete-origin.ts",
44+
"autocomplete-trigger.ts",
45+
"index.ts",
46+
"module.ts",
47+
"public-api.ts",
48+
],
2149
assets = [
22-
":autocomplete_scss",
23-
] + glob(["**/*.html"]),
50+
"autocomplete.html",
51+
":css",
52+
],
2453
deps = [
2554
"//:node_modules/@angular/common",
2655
"//:node_modules/@angular/core",
@@ -35,23 +64,6 @@ ng_project(
3564
],
3665
)
3766

38-
sass_library(
39-
name = "autocomplete_scss_lib",
40-
srcs = glob(["**/_*.scss"]),
41-
deps = [
42-
"//src/material/core:core_scss_lib",
43-
],
44-
)
45-
46-
sass_binary(
47-
name = "autocomplete_scss",
48-
src = "autocomplete.scss",
49-
deps = [
50-
"//src/cdk:sass_lib",
51-
"//src/material/core:core_scss_lib",
52-
],
53-
)
54-
5567
ts_project(
5668
name = "autocomplete_tests_lib",
5769
testonly = True,
@@ -93,7 +105,7 @@ markdown_to_html(
93105

94106
extract_tokens(
95107
name = "tokens",
96-
srcs = [":autocomplete_scss_lib"],
108+
srcs = [":theme"],
97109
)
98110

99111
filegroup(

src/material/badge/BUILD.bazel

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,50 @@ load("//tools:defaults2.bzl", "ng_project", "ts_project")
1010

1111
package(default_visibility = ["//visibility:public"])
1212

13-
ng_project(
14-
name = "badge",
15-
srcs = glob(
16-
["**/*.ts"],
17-
exclude = ["**/*.spec.ts"],
18-
),
19-
assets = [
20-
":badge_scss",
21-
] + glob(["**/*.html"]),
13+
sass_library(
14+
name = "theme",
15+
srcs = [
16+
"_badge-theme.scss",
17+
],
2218
deps = [
23-
"//:node_modules/@angular/animations",
24-
"//:node_modules/@angular/common",
25-
"//:node_modules/@angular/core",
26-
"//:node_modules/@angular/platform-browser",
27-
"//src:dev_mode_types",
28-
"//src/cdk/a11y",
29-
"//src/cdk/private",
30-
"//src/material/core",
19+
"//src/material/core/style:sass_utils",
20+
"//src/material/core/theming",
21+
"//src/material/core/theming:_inspection",
22+
"//src/material/core/theming:_validation",
23+
"//src/material/core/tokens:token_utils",
24+
"//src/material/core/tokens/m2/mat",
25+
"//src/material/core/typography",
3126
],
3227
)
3328

3429
sass_binary(
35-
name = "badge_scss",
30+
name = "badge_css",
3631
src = "badge.scss",
3732
deps = [
3833
"//src/cdk:sass_lib",
39-
"//src/material/core:core_scss_lib",
34+
"//src/material/core/tokens:token_utils",
35+
"//src/material/core/tokens/m2/mat",
4036
],
4137
)
4238

43-
sass_library(
44-
name = "badge_scss_lib",
45-
srcs = glob(["**/_*.scss"]),
39+
ng_project(
40+
name = "badge",
41+
srcs = [
42+
"badge.ts",
43+
"badge-module.ts",
44+
"index.ts",
45+
"public-api.ts",
46+
],
47+
assets = [":badge_css"],
4648
deps = [
47-
"//src/cdk:sass_lib",
48-
"//src/material/core:core_scss_lib",
49+
"//:node_modules/@angular/animations",
50+
"//:node_modules/@angular/common",
51+
"//:node_modules/@angular/core",
52+
"//:node_modules/@angular/platform-browser",
53+
"//src:dev_mode_types",
54+
"//src/cdk/a11y",
55+
"//src/cdk/private",
56+
"//src/material/core",
4957
],
5058
)
5159

@@ -76,7 +84,7 @@ markdown_to_html(
7684

7785
extract_tokens(
7886
name = "tokens",
79-
srcs = [":badge_scss_lib"],
87+
srcs = [":theme"],
8088
)
8189

8290
filegroup(

0 commit comments

Comments
 (0)