-
Notifications
You must be signed in to change notification settings - Fork 6.8k
/
Copy pathBUILD.bazel
47 lines (42 loc) · 1.1 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
load("@aspect_rules_js//js:defs.bzl", "js_binary")
load("//tools:defaults.bzl", "ts_project")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
package(default_visibility = ["//visibility:public"])
ts_project(
name = "extract_api_to_json_lib",
srcs = glob(
["**/*.mts"],
exclude = [
"**/*.spec.ts",
],
),
resolve_json_module = True,
tsconfig = ":tsconfig",
deps = [
"//:node_modules/@angular/compiler",
"//:node_modules/@angular/compiler-cli",
"//:node_modules/@bazel/runfiles",
"//:node_modules/@types/node",
"//:node_modules/typescript",
],
)
# Action binary for the api_gen bazel rule.
js_binary(
name = "extract_api_to_json",
data = [
":extract_api_to_json_lib",
"//:node_modules/typescript",
],
entry_point = "index.mjs",
visibility = ["//visibility:public"],
)
# Expose the sources in the dev-infra NPM package.
filegroup(
name = "files",
srcs = glob(["**/*"]),
)
ts_config(
name = "tsconfig",
src = "tsconfig.json",
deps = ["//:node_modules/@types/node"],
)