feat(design-system): port most of ui atoms to bazel monorepo and new storybook

This commit is contained in:
41666 2020-10-09 15:17:23 -04:00
parent a5e2fdc7a7
commit 72ea639c5d
108 changed files with 13650 additions and 53 deletions

30
hack/react.bzl Normal file
View 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
)