anki/ts/editor/BUILD.bazel

68 lines
1.3 KiB
Python
Raw Normal View History

2021-01-31 14:15:03 +01:00
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")
2021-03-28 18:47:06 +02:00
load("//ts:vendor.bzl", "copy_bootstrap_icons")
2021-01-31 19:03:40 +01:00
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"],
)
2021-01-31 14:15:03 +01:00
ts_library(
name = "editor_ts",
srcs = glob(["*.ts"]),
tsconfig = "//ts:tsconfig.json",
2021-01-31 14:15:03 +01:00
deps = [
"//ts:image_module_support",
"//ts/html-filter",
2021-01-31 14:15:03 +01:00
],
)
2021-03-28 18:47:06 +02:00
copy_bootstrap_icons(
name = "bootstrap-icons",
2021-03-28 18:47:06 +02:00
icons = ["pin-angle.svg"],
)
esbuild(
2021-01-31 14:15:03 +01:00
name = "editor",
args = [
"--loader:.svg=text",
2021-04-07 06:53:53 +02:00
"--resolve-extensions=.mjs,.js",
"--log-level=warning",
],
entry_point = "index_wrapper.ts",
2021-01-31 14:15:03 +01:00
visibility = ["//visibility:public"],
deps = [
"bootstrap-icons",
"editor_ts",
2021-01-31 14:15:03 +01:00
],
)
# Tests
################
prettier_test(
name = "format_check",
srcs = glob([
"*.ts",
]),
)
2021-01-31 20:55:36 +01:00
# eslint_test(
# name = "eslint",
# srcs = glob(
# [
# "*.ts",
# ],
# ),
# )