anki/ts/editor/BUILD.bazel

67 lines
1.3 KiB
Python

load("@npm//@bazel/typescript:index.bzl", "ts_library")
load("//ts:prettier.bzl", "prettier_test")
load("//ts:eslint.bzl", "eslint_test")
load("//ts:esbuild.bzl", "esbuild")
load("//ts:vendor.bzl", "vendor_js_lib", "pkg_from_name")
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
sass_binary(
name = "editor_css",
src = "editor.scss",
visibility = ["//visibility:public"],
)
sass_binary(
name = "editable_css",
src = "editable.scss",
visibility = ["//visibility:public"],
)
ts_library(
name = "editor_ts",
srcs = glob(["*.ts"]),
tsconfig = "//ts:tsconfig.json",
deps = [
"//ts/html-filter",
],
)
vendor_js_lib(
name = "bootstrap-icons",
pkg = pkg_from_name("bootstrap-icons"),
include = [
"icons/pin-angle.svg",
],
strip_prefix = "icons/",
visibility = ["//visibility:public"],
)
esbuild(
name = "editor",
entry_point = "index_wrapper.ts",
visibility = ["//visibility:public"],
deps = [
"editor_ts",
"bootstrap-icons",
],
)
# Tests
################
prettier_test(
name = "format_check",
srcs = glob([
"*.ts",
]),
)
# eslint_test(
# name = "eslint",
# srcs = glob(
# [
# "*.ts",
# ],
# ),
# )