chore: restructure bazel macros

This commit is contained in:
41666 2020-10-15 00:51:53 -04:00
parent a33aa3841c
commit a0b4392b05
54 changed files with 80 additions and 56 deletions

20
hack/bazel/js/react.bzl Normal file
View file

@ -0,0 +1,20 @@
load("@npm//@bazel/typescript:index.bzl", "ts_library")
load("//hack/bazel:utils.bzl", "render_deps")
def react_library(name, deps = [], **kwargs):
ts_library(
name = name,
srcs = native.glob(
[
"*.ts",
"*.tsx",
],
exclude = native.glob([
"*.spec.ts*",
"*.story.tsx",
"*.stories.tsx",
]),
),
deps = render_deps(deps),
**kwargs
)