mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00

upstream.bzl should be kept as close to upstream as possible, so that it's easier to send changes upstream and pull in future changes
65 lines
1.2 KiB
Text
65 lines
1.2 KiB
Text
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", "copy_bootstrap_icons")
|
|
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:image_module_support",
|
|
"//ts/html-filter",
|
|
],
|
|
)
|
|
|
|
copy_bootstrap_icons(
|
|
name = "bootstrap-icons",
|
|
icons = ["pin-angle.svg"],
|
|
)
|
|
|
|
esbuild(
|
|
name = "editor",
|
|
args = [
|
|
"--loader:.svg=text",
|
|
],
|
|
entry_point = "index_wrapper.ts",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"bootstrap-icons",
|
|
"editor_ts",
|
|
],
|
|
)
|
|
|
|
# Tests
|
|
################
|
|
|
|
prettier_test(
|
|
name = "format_check",
|
|
srcs = glob([
|
|
"*.ts",
|
|
]),
|
|
)
|
|
|
|
# eslint_test(
|
|
# name = "eslint",
|
|
# srcs = glob(
|
|
# [
|
|
# "*.ts",
|
|
# ],
|
|
# ),
|
|
# )
|