anki/ts/lib/BUILD.bazel
Damien Elmes afc2892f2e move to new rules_nodejs protobuf example to unblock upgrade
@hgiesel the tag editor will need to add the following to the rollup
deps:

        "//ts/lib:backend_proto",
        "//ts/lib:fluent_proto",
2021-03-20 10:24:32 +10:00

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"]),
)