anki/ts/reviewer/BUILD.bazel

83 lines
1.6 KiB
Python
Raw Normal View History

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")
2021-07-05 12:45:44 +02:00
compile_sass(
srcs = [
"reviewer.scss",
],
group = "reviewer_scss",
visibility = ["//visibility:public"],
deps = [],
)
ts_library(
name = "reviewer_ts",
2021-07-27 07:13:39 +02:00
srcs = glob(
["*.ts"],
exclude = ["reviewer_extras.ts"],
),
module_name = "reviewer",
deps = [
"//ts/lib",
"//ts/lib:backend_proto",
"@npm//css-browser-selector",
2021-07-12 16:49:32 +02:00
"@npm//jquery",
],
)
esbuild(
2021-07-05 12:45:44 +02:00
name = "reviewer",
args = [
"--resolve-extensions=.mjs,.js",
"--log-level=warning",
],
2021-07-05 12:45:44 +02:00
entry_point = "index_wrapper.ts",
visibility = ["//visibility:public"],
deps = [
":reviewer_ts",
"//ts/lib",
"//ts/lib:backend_proto",
"@npm//protobufjs",
],
)
2021-07-27 07:13:39 +02:00
esbuild(
name = "reviewer_extras",
srcs = [
"reviewer_extras.ts",
],
args = [
"--resolve-extensions=.mjs,.js",
"--log-level=warning",
],
entry_point = "reviewer_extras.ts",
visibility = ["//visibility:public"],
deps = [
":reviewer_ts",
"//ts/lib",
"//ts/lib:backend_proto",
"@npm//protobufjs",
],
)
# Tests
################
prettier_test(
name = "format_check",
srcs = glob([
"*.ts",
]),
)
eslint_test(
name = "eslint",
srcs = glob([
"*.ts",
]),
)