-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
94 lines (86 loc) · 2.26 KB
/
BUILD.bazel
File metadata and controls
94 lines (86 loc) · 2.26 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
93
94
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults.bzl", "http_server", "ng_project", "sass_binary")
package(default_visibility = ["//visibility:public"])
npm_link_all_packages()
# List of dependencies that are referenced in the `index.html` file.
devserverIndexHtmlDependencies = [
"//:node_modules/zone.js",
"//:node_modules/kagekiri",
"//src/material/prebuilt-themes:azure-blue",
":index.html",
":theme",
]
exports_files([
"protractor.conf.js",
"devserver-configure.js",
])
ng_project(
name = "e2e-app",
testonly = True,
srcs = glob(
["**/*.ts"],
),
assets = glob(
[
"**/*.html",
"**/*.css",
],
exclude = ["index.html"],
),
deps = [
"//:node_modules/@angular/core",
"//:node_modules/@angular/forms",
"//:node_modules/@angular/platform-browser",
"//:node_modules/@angular/router",
"//src/cdk-experimental/scrolling",
"//src/cdk/overlay",
"//src/cdk/scrolling",
"//src/cdk/testing/tests:test_components",
"//src/components-examples/private",
"//src/material/button",
"//src/material/core",
"//src/material/slider",
],
)
sass_binary(
name = "theme",
src = "theme.scss",
deps = [
"//src/material:sass_lib",
"//src/material-experimental:sass_lib",
],
)
esbuild(
name = "bundles",
testonly = True,
srcs = [
":e2e-app",
"//:node_modules/tslib",
"//src:build-tsconfig",
],
bundle = True,
config = "//src:esbuild-linked-config",
entry_point = ":main.js",
format = "esm",
metafile = True,
output_dir = True,
platform = "browser",
sourcemap = "external",
splitting = True,
# We cannot use `ES2017` or high 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",
)
http_server(
name = "server",
testonly = True,
srcs = devserverIndexHtmlDependencies,
additional_root_paths = [
"_main/",
],
tags = ["manual"],
deps = [
":bundles",
],
)