-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
109 lines (100 loc) · 2.48 KB
/
BUILD.bazel
File metadata and controls
109 lines (100 loc) · 2.48 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
load("@bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
package(default_visibility = [":__subpackages__"])
copy_to_bin(
name = "schematics_assets",
srcs = glob(
[
"**/files/**/*",
"**/*.json",
],
exclude = [
"tsconfig.json",
"tsconfig-test.json",
"package.json",
],
),
)
copy_to_bin(
name = "package_json",
srcs = ["package.json"],
)
rules_js_tsconfig(
name = "tsconfig",
src = "tsconfig.json",
)
rules_js_tsconfig(
name = "tsconfig_test",
src = "tsconfig-test.json",
deps = [
":tsconfig",
],
)
ts_project(
name = "schematics",
srcs = glob(
["**/*.ts"],
exclude = [
"**/files/**/*",
"**/*.spec.ts",
"testing/**/*.ts",
],
),
tsconfig = ":tsconfig",
deps = [
"//:node_modules/@angular-devkit/core",
"//:node_modules/@angular-devkit/schematics",
"//:node_modules/@schematics/angular",
"//:node_modules/@types/node",
"//:node_modules/glob",
"//:node_modules/parse5",
"//:node_modules/typescript",
"//src/cdk/schematics/update-tool",
],
)
# This package is intended to be combined into the main @angular/cdk package as a dep.
npm_package(
name = "npm_package",
srcs = [
"package.json",
":schematics",
":schematics_assets",
],
package = "@angular/cdk/schematics",
visibility = [
"//src/cdk:__pkg__",
"//src/material/schematics:__pkg__",
],
)
ts_project(
name = "unit_test_sources",
testonly = True,
srcs = glob(
["**/*.spec.ts"],
exclude = [
"**/*.e2e.spec.ts",
"**/files/**/*.spec.ts",
],
),
tsconfig = "tsconfig_test",
deps = [
":schematics",
"//:node_modules/@angular-devkit/schematics",
"//:node_modules/@bazel/runfiles",
"//:node_modules/@schematics/angular",
"//:node_modules/@types/jasmine",
"//:node_modules/@types/node",
"//:node_modules/parse5",
"//:node_modules/typescript",
"//src/cdk/schematics/testing",
"//src/cdk/schematics/update-tool",
],
)
jasmine_test(
name = "unit_tests",
data = [
":schematics_assets",
":unit_test_sources",
],
)