-
-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathBUILD.bazel
More file actions
112 lines (98 loc) · 2.83 KB
/
BUILD.bazel
File metadata and controls
112 lines (98 loc) · 2.83 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
102
103
104
105
106
107
108
109
110
111
112
"Internal implementation details"
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_bazel_lib//lib:utils.bzl", bazel_lib_utils = "utils")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
package(default_visibility = ["//visibility:public"])
exports_files(glob(["*.bzl"]))
exports_files([
"js_binary.bat.tpl",
"js_binary.sh.tpl",
"node_wrapper.bat",
"node_wrapper.sh",
"npm_wrapper.bat",
"npm_wrapper.sh",
"js_image_layer.mjs",
])
bzl_library(
name = "js_info_files",
srcs = ["js_info_files.bzl"],
deps = [
":js_helpers",
] + (["@bazel_tools//tools/build_defs/repo:cache.bzl"] if bazel_lib_utils.is_bazel_7_or_greater() else []),
)
bzl_library(
name = "js_binary",
srcs = ["js_binary.bzl"],
deps = [
":bash",
":js_helpers",
"@aspect_bazel_lib//lib:copy_to_bin",
"@aspect_bazel_lib//lib:directory_path",
"@aspect_bazel_lib//lib:expand_make_vars",
"@aspect_bazel_lib//lib:paths",
"@aspect_bazel_lib//lib:windows_utils",
"@bazel_skylib//lib:dicts",
] + (["@bazel_tools//tools/build_defs/repo:cache.bzl"] if bazel_lib_utils.is_bazel_7_or_greater() else []),
)
bzl_library(
name = "js_helpers",
srcs = ["js_helpers.bzl"],
deps = [
":js_info",
"//npm:providers",
"@aspect_bazel_lib//lib:copy_to_bin",
],
)
bzl_library(
name = "js_library",
srcs = ["js_library.bzl"],
deps = [
":js_helpers",
":js_info",
"@aspect_bazel_lib//lib:copy_to_bin",
"@bazel_skylib//lib:dicts",
] + (["@bazel_tools//tools/build_defs/repo:cache.bzl"] if bazel_lib_utils.is_bazel_7_or_greater() else []),
)
bzl_library(
name = "js_run_binary",
srcs = ["js_run_binary.bzl"],
deps = [
":js_helpers",
":js_info_files",
":js_library",
"@aspect_bazel_lib//lib:copy_to_bin",
"@aspect_bazel_lib//lib:run_binary",
"@bazel_skylib//lib:dicts",
],
)
bzl_library(
name = "js_run_devserver",
srcs = ["js_run_devserver.bzl"],
deps = [
":js_binary",
":js_helpers",
"@bazel_skylib//lib:dicts",
] + (["@bazel_tools//tools/build_defs/repo:cache.bzl"] if bazel_lib_utils.is_bazel_7_or_greater() else []),
)
bzl_library(
name = "js_info",
srcs = ["js_info.bzl"],
visibility = ["//js:__subpackages__"],
)
bzl_library(
name = "bash",
srcs = ["bash.bzl"],
visibility = ["//js:__subpackages__"],
)
bzl_library(
name = "js_image_layer",
srcs = ["js_image_layer.bzl"],
deps = [
"@aspect_bazel_lib//lib:tar",
"@bazel_skylib//lib:paths",
] + (["@bazel_tools//tools/build_defs/repo:cache.bzl"] if bazel_lib_utils.is_bazel_7_or_greater() else []),
)
copy_to_bin(
name = "js_devserver_entrypoint",
srcs = ["js_run_devserver.mjs"],
)