2020-11-01 05:26:58 +01:00
|
|
|
load("@build_bazel_rules_svelte//:defs.bzl", "svelte")
|
|
|
|
load("@npm//svelte-check:index.bzl", _svelte_check = "svelte_check_test")
|
|
|
|
|
|
|
|
def compile_svelte(name, srcs):
|
|
|
|
for src in srcs:
|
|
|
|
svelte(
|
|
|
|
name = src.replace(".svelte", ""),
|
|
|
|
entry_point = src,
|
|
|
|
)
|
|
|
|
|
|
|
|
native.filegroup(
|
|
|
|
name = name,
|
|
|
|
srcs = srcs,
|
|
|
|
)
|
|
|
|
|
|
|
|
def svelte_check(name = "svelte_check", srcs = []):
|
|
|
|
_svelte_check(
|
|
|
|
name = name,
|
|
|
|
args = [
|
|
|
|
"--workspace",
|
|
|
|
native.package_name(),
|
|
|
|
],
|
|
|
|
data = [
|
|
|
|
"//ts:tsconfig.json",
|
|
|
|
"//ts/lib",
|
|
|
|
"//ts/lib:backend_proto",
|
2021-02-05 23:32:14 +01:00
|
|
|
"@npm//sass"
|
2020-11-01 05:26:58 +01:00
|
|
|
] + srcs,
|
|
|
|
link_workspace_root = True,
|
|
|
|
)
|