anki/ts/reviewer/BUILD.bazel
2021-07-16 16:56:55 +02:00

61 lines
1.1 KiB
Python

load("@npm//@bazel/typescript:index.bzl", "ts_library")
load("//ts:prettier.bzl", "prettier_test")
load("//ts:eslint.bzl", "eslint_test")
load("//ts/svelte:svelte.bzl", "svelte", "svelte_check")
load("//ts:esbuild.bzl", "esbuild")
load("//ts:compile_sass.bzl", "compile_sass")
compile_sass(
srcs = [
"reviewer.scss",
],
group = "reviewer_scss",
visibility = ["//visibility:public"],
deps = [],
)
ts_library(
name = "lib",
srcs = glob(["*.ts"]),
deps = ["//ts/lib"],
)
esbuild(
name = "reviewer",
srcs = [
"//ts:protobuf-shim.js",
],
args = [
"--resolve-extensions=.mjs,.js",
"--log-level=warning",
],
entry_point = "index_wrapper.ts",
external = [
"protobufjs/light",
],
visibility = ["//visibility:public"],
deps = [
":lib",
"//ts/lib",
"@npm//protobufjs",
],
)
# Tests
################
prettier_test(
name = "format_check",
srcs = glob([
"*.ts",
]),
)
eslint_test(
name = "eslint",
srcs = glob([
"*.ts",
]),
)