anki/ts/svelte.bzl
Damien Elmes 971b6726c0 Restore "Merge pull request #1007 from hgiesel/sveltesass2""
This reverts commit ffcf0aa3ca and
points to a new rules_svelte commit.

It looks like we were getting away with not listing the dep on the
rules_svelte end - the failing build turned out to be because we need
to pass sass in to our local svelte_check invocation.
2021-02-06 08:39:36 +10:00

31 lines
739 B
Python

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",
"@npm//sass"
] + srcs,
link_workspace_root = True,
)