-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.bazel
More file actions
101 lines (94 loc) · 2.67 KB
/
Copy pathBUILD.bazel
File metadata and controls
101 lines (94 loc) · 2.67 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
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package", "npm_package")
load("@tummycrypt_tinyland_a11y_engine_npm//:defs.bzl", "npm_link_all_packages")
load("@tummycrypt_tinyland_a11y_engine_npm//:vitest/package_json.bzl", vitest_bin = "bin")
npm_link_all_packages(name = "node_modules")
# First-party dep resolved through the Bazel module graph (not npm).
# tinyland-color-utils is linked from its published module's :pkg target;
# it is removed from package.json so npm_link_all_packages does not also link it.
npm_link_package(
name = "node_modules/@tummycrypt/tinyland-color-utils",
src = "@tummycrypt_tinyland_color_utils//:pkg",
)
ts_project(
name = "tinyland_a11y_engine",
srcs = glob(
["src/**/*.ts"],
exclude = [
"src/**/*.test.ts",
"src/**/*.spec.ts",
],
),
declaration = True,
declaration_map = True,
source_map = False,
resolve_json_module = True,
tsconfig = ":tsconfig.json",
transpiler = "tsc",
out_dir = "dist",
root_dir = "src",
validate = False,
deps = [
":node_modules",
":node_modules/@types/node",
":node_modules/svelte",
":node_modules/axe-core",
":node_modules/@tummycrypt/tinyland-color-utils",
],
visibility = ["//visibility:public"],
)
npm_package(
name = "pkg",
srcs = [
"package.json",
"README.md",
"LICENSE",
":tinyland_a11y_engine",
],
package = "@tummycrypt/tinyland-a11y-engine",
version = "0.2.3",
visibility = ["//visibility:public"],
)
vitest_bin.vitest_test(
name = "test",
data = [
":node_modules",
"tsconfig.json",
":node_modules/vitest",
":node_modules/@tummycrypt/tinyland-color-utils",
"vitest.config.ts",
] + glob(["src/**/*.ts"]) + glob(["tests/**/*.test.ts", "tests/**/*.ts"]),
args = [
"run",
"--reporter=verbose",
"--config",
"$(rootpath vitest.config.ts)",
],
log_level = "info",
visibility = ["//visibility:public"],
)
ts_project(
name = "typecheck",
srcs = glob(["src/**/*.ts"]),
declaration = False,
no_emit = True,
tsconfig = ":tsconfig.json",
transpiler = "tsc",
validate = False,
deps = [
":node_modules",
":node_modules/@types/node",
":node_modules/svelte",
":node_modules/axe-core",
":node_modules/@tummycrypt/tinyland-color-utils",
],
visibility = ["//visibility:public"],
)
exports_files(
[
"package.json",
"tsconfig.json",
"vitest.config.ts",
],
visibility = ["//visibility:public"],
)