mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-14 16:49:10 +00:00
feat(design-system): port most of ui atoms to bazel monorepo and new storybook
This commit is contained in:
parent
a5e2fdc7a7
commit
72ea639c5d
108 changed files with 13650 additions and 53 deletions
30
hack/react.bzl
Normal file
30
hack/react.bzl
Normal file
|
@ -0,0 +1,30 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_library")
|
||||
|
||||
def _render_deps(deps = []):
|
||||
output_deps = []
|
||||
|
||||
for dep in deps:
|
||||
if dep.startswith("//"):
|
||||
output_deps.append(dep)
|
||||
else:
|
||||
output_deps.append("@npm//" + dep)
|
||||
|
||||
return output_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
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue