afc2892f2e
@hgiesel the tag editor will need to add the following to the rollup deps: "//ts/lib:backend_proto", "//ts/lib:fluent_proto",
55 lines
1.0 KiB
Python
55 lines
1.0 KiB
Python
load("@npm//@bazel/typescript:index.bzl", "ts_library")
|
|
load("//ts:prettier.bzl", "prettier_test")
|
|
load("//ts:eslint.bzl", "eslint_test")
|
|
load("//ts:protobuf.bzl", "protobufjs_library")
|
|
|
|
# Protobuf
|
|
#############
|
|
|
|
protobufjs_library(
|
|
name = "fluent_proto",
|
|
proto = "//rslib:fluent_proto_lib",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
protobufjs_library(
|
|
name = "backend_proto",
|
|
proto = "//rslib:backend_proto_lib",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# Anki Library
|
|
################
|
|
|
|
ts_library(
|
|
name = "lib",
|
|
srcs = glob(["**/*.ts"]),
|
|
data = [
|
|
"backend_proto",
|
|
],
|
|
module_name = "anki",
|
|
tsconfig = "//:tsconfig.json",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"backend_proto",
|
|
"fluent_proto",
|
|
"@npm//@fluent/bundle",
|
|
"@npm//@types/long",
|
|
"@npm//intl-pluralrules",
|
|
"@npm//tslib",
|
|
],
|
|
)
|
|
|
|
# Tests
|
|
################
|
|
|
|
prettier_test(
|
|
name = "format_check",
|
|
srcs = glob(["*.ts"]),
|
|
)
|
|
|
|
eslint_test(
|
|
name = "eslint",
|
|
srcs = glob(["*.ts"]),
|
|
)
|