-
Notifications
You must be signed in to change notification settings - Fork 6.7k
/
BUILD.bazel
128 lines (120 loc) · 3.8 KB
/
BUILD.bazel
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
load("//tools:defaults.bzl", "devmode_esbuild", "esbuild_config", "http_server", "ng_module", "sass_binary")
load("//src/components-examples:config.bzl", "ALL_EXAMPLES")
load("//tools/angular:index.bzl", "LINKER_PROCESSED_FW_PACKAGES")
package(default_visibility = ["//visibility:public"])
# List of dependencies that are referenced in the `index.html` file.
devserverIndexHtmlDependencies = [
"@npm//zone.js",
"@npm//kagekiri",
"//src/material/prebuilt-themes:indigo-pink",
":index.html",
":theme",
]
exports_files([
"protractor.conf.js",
"start-devserver.js",
"devserver-configure.js",
])
ng_module(
name = "e2e-app",
testonly = True,
srcs = glob(
["**/*.ts"],
exclude = ["test-util/**"],
),
assets = glob(
[
"**/*.html",
"**/*.css",
],
exclude = ["index.html"],
),
deps = [
"//src/cdk-experimental/scrolling",
"//src/cdk/dialog",
"//src/cdk/drag-drop",
"//src/cdk/overlay",
"//src/cdk/scrolling",
"//src/cdk/testing/tests:test_components",
"//src/components-examples/material-experimental/mdc-card",
"//src/components-examples/private",
"//src/material-experimental/mdc-button",
"//src/material-experimental/mdc-menu",
"//src/material-experimental/mdc-progress-spinner",
"//src/material-experimental/mdc-radio",
"//src/material-experimental/mdc-slide-toggle",
"//src/material-experimental/mdc-slider",
"//src/material-experimental/mdc-table",
"//src/material-experimental/mdc-tabs",
"//src/material/button",
"//src/material/card",
"//src/material/checkbox",
"//src/material/chips",
"//src/material/core",
"//src/material/dialog",
"//src/material/grid-list",
"//src/material/icon",
"//src/material/input",
"//src/material/legacy-checkbox",
"//src/material/legacy-dialog",
"//src/material/legacy-form-field",
"//src/material/legacy-input",
"//src/material/legacy-progress-bar",
"//src/material/list",
"//src/material/menu",
"//src/material/progress-bar",
"//src/material/progress-spinner",
"//src/material/radio",
"//src/material/select",
"//src/material/sidenav",
"//src/material/slide-toggle",
"//src/material/tabs",
"@npm//@angular/animations",
"@npm//@angular/core",
"@npm//@angular/forms",
"@npm//@angular/platform-browser",
"@npm//@angular/router",
],
)
sass_binary(
name = "theme",
src = "theme.scss",
deps = [
"//src/material:sass_lib",
"//src/material-experimental:sass_lib",
"//src/material/core:theming_scss_lib",
],
)
esbuild_config(
name = "esbuild_config",
testonly = True,
config_file = "esbuild.config.mjs",
)
devmode_esbuild(
name = "bundles",
testonly = True,
config = ":esbuild_config",
entry_points = [":main.ts"] + ["%s:index.ts" % e for e in ALL_EXAMPLES],
platform = "browser",
splitting = True,
# We cannot use `ES2017` or higher as that would result in `async/await` not being downleveled.
# ZoneJS needs to be able to intercept these as otherwise change detection would not work properly.
target = "es2016",
# Note: We add all linker-processed FW packages as dependencies here so that ESBuild will
# map all framework packages to their linker-processed bundles from `tools/angular`.
deps = LINKER_PROCESSED_FW_PACKAGES + [
":e2e-app",
],
)
http_server(
name = "server",
testonly = True,
srcs = devserverIndexHtmlDependencies,
additional_root_paths = [
"npm/node_modules",
],
tags = ["manual"],
deps = [
":bundles",
],
)