-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
83 lines (71 loc) · 1.94 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
73
74
75
76
77
78
79
80
81
82
83
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//vitest:defs.bzl", "vitest_test")
npm_link_all_packages(name = "node_modules")
gazelle_binary(
name = "gazelle_bin",
languages = ["@bazel_skylib_gazelle_plugin//bzl"],
)
gazelle(
name = "gazelle",
gazelle = "gazelle_bin",
mode = "fix",
)
gazelle(
name = "gazelle.check",
gazelle = "gazelle_bin",
mode = "diff",
)
buildifier(
name = "buildifier",
exclude_patterns = ["./.git/*"],
lint_mode = "fix",
mode = "fix",
tags = ["manual"], # tag as manual so windows ci does not build it by default
)
buildifier(
name = "buildifier.check",
exclude_patterns = ["./.git/*"],
lint_mode = "warn",
mode = "diff",
tags = ["manual"], # tag as manual so windows ci does not build it by default
)
alias(
name = "format",
actual = "//tools:format",
)
# Test case 3: vitest config file in root package
# Copy files from tests package to keep the root package clean.
copy_file(
name = "case3_test_js",
src = "//vitest/tests:case3.test.js",
out = "case3.test.js",
)
copy_file(
name = "case3_vitest_config_mjs",
src = "//vitest/tests:case3.vitest.config.mjs",
out = "case3.vitest.config.mjs",
)
vitest_test(
name = "case3",
config = "case3.vitest.config.mjs",
data = [
"case3.test.js",
],
node_modules = "//:node_modules",
)
copy_to_bin(
name = "case8.config",
srcs = ["test_case8.vitest.config.js"],
visibility = ["//visibility:public"],
)
bzl_library(
name = "internal_deps",
srcs = ["internal_deps.bzl"],
visibility = ["//visibility:public"],
deps = ["//vitest/private:maybe"],
)