-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
88 lines (78 loc) · 2.24 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
84
85
86
87
88
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands") # C++
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
package(default_visibility = ["//visibility:public"])
compile_pip_requirements(
name = "requirements",
requirements_in = "requirements.in",
)
npm_link_all_packages(name = "node_modules")
exports_files(
[
".clang-tidy",
".clang-format",
".editorconfig",
".flake8",
".npmrc",
".ruff.toml",
".vale.ini",
"buf.yaml",
"eslint.config.js",
"ktlint-baseline.xml",
"maven_install.json",
"package.json",
"pmd.xml",
"pnpm-lock.yaml",
"prettier.config.cjs",
".scalafmt.conf",
".shellcheckrc",
"stylelint.config.js",
"tsconfig.json",
],
visibility = ["//visibility:public"],
)
js_library(
name = "eslintrc",
srcs = ["eslint.config.mjs"],
deps = [
":node_modules/@eslint/js",
":node_modules/typescript-eslint",
],
)
js_library(
name = "stylelintrc",
srcs = ["stylelint.config.mjs"],
deps = [":node_modules/stylelint-config-standard"],
)
js_library(
name = "prettierrc",
srcs = ["prettier.config.cjs"],
deps = [":node_modules/prettier-plugin-sql"],
)
ts_config(
name = "tsconfig",
src = "tsconfig.json",
)
# NB: this alias does NOT cause Bazel's Loading phase to load the tools/BUILD file.
# That's important as we don't want users to wait for "Eager fetching" for ~EVERY language which
# that build file loads from.
# Demonstration: we'll build the js_library above, then build this format alias, and see that many
# more repositories were fetched for the latter:
# % export T=$(mktemp -d)
# % bazel --output_base=$T build :eslintrc; ls $T/external > one
# % bazel --output_base=$T build :format; ls $T/external > two
# % wc -l one two
# 738 one
# 936 two
alias(
name = "format",
actual = "//tools/format",
)
refresh_compile_commands(
name = "refresh_cpp_compile_commands",
targets = {
"//...": "",
},
)