-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
72 lines (64 loc) · 1.72 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
load("@bazel_gazelle//:def.bzl", "gazelle")
package(default_visibility = ["//visibility:public"])
# gazelle:exclude dist
# gazelle:exclude node_modules
gazelle(
name = "gazelle",
prefix = "angular_bazel_GRPC",
)
alias(
name = "install",
actual = "@nodejs//:yarn",
)
# This export allows targets in other packages to reference files that live
# in this package.
exports_files([
# Let ts_library targets reference the root tsconfig.json file
"tsconfig.json",
# Let devserver and testing targets reference zone.js distro
"node_modules/zone.js/dist/zone.min.js",
"node_modules/zone.js/dist/zone-testing-bundle.js",
])
# NOTE: this will move to node_modules/BUILD in a later release
filegroup(
name = "node_modules",
# NB: rxjs is not in this list, because we build it from sources using the
# label @rxjs//:rxjs
srcs = glob(["/".join([
"node_modules",
pkg,
"**",
ext,
]) for pkg in [
"@angular",
"@ngrx",
"@types",
"protractor",
"tsickle",
"tsutils",
"typescript",
] for ext in [
"*.js",
"*.json",
"*.d.ts",
]]),
)
ANGULAR_TESTING = [
"node_modules/@angular/*/bundles/*-testing.umd.js",
# We use AOT, so the compiler and the dynamic platform-browser should be
# visible only in tests
"node_modules/@angular/compiler/bundles/*.umd.js",
"node_modules/@angular/platform-browser-dynamic/bundles/*.umd.js",
]
filegroup(
name = "angular_bundles",
srcs = glob(
["node_modules/@angular/*/bundles/*.umd.js"],
exclude = ANGULAR_TESTING,
),
)
filegroup(
name = "angular_test_bundles",
testonly = 1,
srcs = glob(ANGULAR_TESTING),
)