2021-05-17 08:59:02 +02:00
|
|
|
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 = [],
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2021-05-17 08:59:02 +02:00
|
|
|
ts_library(
|
2021-07-12 16:04:27 +02:00
|
|
|
name = "reviewer_ts",
|
2021-05-17 08:59:02 +02:00
|
|
|
srcs = glob(["*.ts"]),
|
2021-07-12 16:04:27 +02:00
|
|
|
deps = [
|
|
|
|
"//ts/lib",
|
|
|
|
"//ts/lib:backend_proto",
|
|
|
|
"@npm//css-browser-selector",
|
|
|
|
],
|
2021-05-17 08:59:02 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
esbuild(
|
2021-07-05 12:45:44 +02:00
|
|
|
name = "reviewer",
|
|
|
|
srcs = [
|
|
|
|
"//ts:protobuf-shim.js",
|
|
|
|
],
|
2021-05-17 08:59:02 +02:00
|
|
|
args = [
|
|
|
|
"--resolve-extensions=.mjs,.js",
|
|
|
|
"--log-level=warning",
|
|
|
|
],
|
2021-07-05 12:45:44 +02:00
|
|
|
entry_point = "index_wrapper.ts",
|
|
|
|
external = [
|
|
|
|
"protobufjs/light",
|
|
|
|
],
|
2021-05-17 08:59:02 +02:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2021-07-12 16:04:27 +02:00
|
|
|
":reviewer_ts",
|
2021-05-17 08:59:02 +02:00
|
|
|
"//ts/lib",
|
2021-07-10 06:59:23 +02:00
|
|
|
"@npm//protobufjs",
|
2021-05-17 08:59:02 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
# Tests
|
|
|
|
################
|
|
|
|
|
|
|
|
prettier_test(
|
|
|
|
name = "format_check",
|
|
|
|
srcs = glob([
|
|
|
|
"*.ts",
|
|
|
|
]),
|
|
|
|
)
|
|
|
|
|
|
|
|
eslint_test(
|
|
|
|
name = "eslint",
|
|
|
|
srcs = glob([
|
|
|
|
"*.ts",
|
|
|
|
]),
|
|
|
|
)
|