5
5
package (default_visibility = ["//visibility:public" ])
6
6
7
7
load ("//tools:defaults.bzl" , "ts_library" )
8
+ load ("@build_bazel_rules_nodejs//:defs.bzl" , "jasmine_node_test" )
8
9
9
10
licenses (["notice" ]) # MIT License
10
11
12
+
13
+ # @angular-devkit/core
14
+
11
15
ts_library (
12
16
name = "core" ,
13
17
srcs = glob (
@@ -20,7 +24,7 @@ ts_library(
20
24
),
21
25
data = glob (["**/*.json" ]),
22
26
module_name = "@angular-devkit/core" ,
23
- module_root = "src" ,
27
+ module_root = "src/index.d.ts " ,
24
28
deps = [
25
29
"@rxjs" ,
26
30
"@rxjs//operators" ,
@@ -33,32 +37,72 @@ ts_library(
33
37
],
34
38
)
35
39
40
+ ts_library (
41
+ name = "core_test_lib" ,
42
+ srcs = glob (
43
+ include = [
44
+ "src/**/*_spec.ts" ,
45
+ "src/**/*_spec_large.ts" ,
46
+ ],
47
+ exclude = [
48
+ # The workspace spec expects workspace.json to be there, but it's not.
49
+ # TODO(@filipesilva): figure out how to resolve these in bazel.
50
+ "src/workspace/workspace_spec.ts" ,
51
+ ],
52
+ ),
53
+ data = [
54
+ "src/workspace/workspace-schema.json"
55
+ ],
56
+ deps = [
57
+ ":core" ,
58
+ ":node" ,
59
+ "@rxjs" ,
60
+ "@rxjs//operators" ,
61
+ # @typings: jasmine
62
+ # @typings: node
63
+ ],
64
+ )
65
+
66
+ jasmine_node_test (
67
+ name = "core_test" ,
68
+ srcs = [":core_test_lib" ],
69
+ )
70
+
71
+
72
+ # @angular-devkit/core/node
73
+
36
74
ts_library (
37
75
name = "node" ,
38
76
srcs = glob (
39
77
include = ["node/**/*.ts" ],
40
78
exclude = [
79
+ "node/testing/**/*.ts" ,
41
80
"node/**/*_spec.ts" ,
42
81
"node/**/*_spec_large.ts" ,
43
- "tools /**/*_benchmark.ts" ,
82
+ "node /**/*_benchmark.ts" ,
44
83
],
45
84
),
46
85
module_name = "@angular-devkit/core/node" ,
47
- module_root = "node" ,
86
+ module_root = "node/index.d.ts " ,
48
87
deps = [
49
- "//packages/angular_devkit/ core" ,
88
+ ": core" ,
50
89
"@rxjs" ,
51
90
"@rxjs//operators" ,
52
91
# @typings: node
53
92
],
54
93
)
55
94
56
95
ts_library (
57
- name = "spec " ,
96
+ name = "node_test_lib " ,
58
97
srcs = glob (
59
98
include = [
60
- "**/*_spec.ts" ,
61
- "**/*_spec_large.ts" ,
99
+ "node/**/*_spec.ts" ,
100
+ "node/**/*_spec_large.ts" ,
101
+ ],
102
+ exclude = [
103
+ # The node resolve spec uses the _devKitRoot global, which isn't available in Bazel.
104
+ # TODO(@filipesilva): figure out an alternative to that global.
105
+ "node/resolve_spec.ts" ,
62
106
],
63
107
),
64
108
deps = [
@@ -70,3 +114,32 @@ ts_library(
70
114
# @typings: node
71
115
],
72
116
)
117
+
118
+ jasmine_node_test (
119
+ name = "node_test" ,
120
+ srcs = [":node_test_lib" ],
121
+ )
122
+
123
+
124
+ # @angular-devkit/core/node/testing
125
+
126
+ ts_library (
127
+ name = "node_testing" ,
128
+ srcs = glob (
129
+ include = ["node/testing/**/*.ts" ],
130
+ exclude = [
131
+ "node/testing/**/*_spec.ts" ,
132
+ "node/testing/**/*_spec_large.ts" ,
133
+ "node/testing/**/*_benchmark.ts" ,
134
+ ],
135
+ ),
136
+ module_name = "@angular-devkit/core/node/testing" ,
137
+ module_root = "node/testing/index.d.ts" ,
138
+ deps = [
139
+ ":core" ,
140
+ ":node" ,
141
+ "@rxjs" ,
142
+ "@rxjs//operators" ,
143
+ # @typings: node
144
+ ],
145
+ )
0 commit comments