anki/ts/sveltelib/BUILD.bazel
Damien Elmes 12ea482c87 expose require() instead of the svelte global
- Means add-on authors should not need to inject any code in their build
- Should be more flexible - we can export multiple libraries if we wish,
and don't have to worry about require() being clobbered by old add-ons.
2021-08-24 10:22:07 +10:00

34 lines
612 B
Python

load("@npm//@bazel/typescript:index.bzl", "ts_library")
load("//ts:prettier.bzl", "prettier_test")
load("//ts:eslint.bzl", "eslint_test")
# Anki Library
################
ts_library(
name = "sveltelib",
srcs = glob(["**/*.ts"]),
data = [],
module_name = "sveltelib",
tsconfig = "//:tsconfig.json",
visibility = ["//visibility:public"],
deps = [
"//ts/lib",
"@npm//svelte",
"@npm//tslib",
],
)
# Tests
################
prettier_test(
name = "format_check",
srcs = glob(["*.ts"]),
)
eslint_test(
name = "eslint",
srcs = glob(["*.ts"]),
)