mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 01:59:08 +00:00
chore: restructure bazel macros
This commit is contained in:
parent
a33aa3841c
commit
a0b4392b05
54 changed files with 80 additions and 56 deletions
22
hack/bazel/utils.bzl
Normal file
22
hack/bazel/utils.bzl
Normal file
|
@ -0,0 +1,22 @@
|
|||
def render_deps(deps = []):
|
||||
output_deps = []
|
||||
|
||||
has_added_grpc_deps = False
|
||||
|
||||
for dep in deps:
|
||||
if dep.startswith("//src/rpc"):
|
||||
output_deps.append(dep + ":ts")
|
||||
output_deps.append(dep + ":ts_proto")
|
||||
if has_added_grpc_deps == False:
|
||||
output_deps.extend([
|
||||
"@npm//google-protobuf",
|
||||
"@npm//@types/google-protobuf",
|
||||
"@npm//@improbable-eng/grpc-web",
|
||||
])
|
||||
has_added_grpc_deps = True
|
||||
elif dep.startswith("//") or dep.startswith("@npm//"):
|
||||
output_deps.append(dep)
|
||||
else:
|
||||
output_deps.append("@npm//" + dep)
|
||||
|
||||
return output_deps
|
Loading…
Add table
Add a link
Reference in a new issue