mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 11:59:11 +00:00
27 lines
631 B
Python
27 lines
631 B
Python
load("@npm//@bazel/typescript:index.bzl", "ts_library")
|
|
load("//hack/bazel:utils.bzl", "render_deps")
|
|
|
|
DEFAULT_DEPS = [
|
|
"react",
|
|
"styled-components",
|
|
"@types/react",
|
|
"@types/styled-components",
|
|
]
|
|
|
|
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 + DEFAULT_DEPS),
|
|
**kwargs
|
|
)
|