anki/qt/aqt/data/web/js/BUILD.bazel

67 lines
1.2 KiB
Python
Raw Normal View History

load("@npm//@bazel/typescript:index.bzl", "ts_library")
2021-01-30 17:54:07 +01:00
load("@npm//@bazel/rollup:index.bzl", "rollup_bundle")
2021-01-31 14:15:03 +01:00
load("//qt/aqt/data/web/pages:defs.bzl", "copy_page")
load("//ts:prettier.bzl", "prettier_test")
2021-01-30 17:54:07 +01:00
load("//ts:eslint.bzl", "eslint_test")
ts_library(
name = "pycmd",
srcs = ["pycmd.d.ts"],
2021-01-30 17:54:07 +01:00
visibility = ["//qt/aqt/data/web/js:__subpackages__"],
)
ts_library(
name = "aqt",
srcs = glob(
["*.ts"],
exclude = ["*.d.ts"],
),
tsconfig = "tsconfig.json",
deps = [
"pycmd",
"@npm//@types/jquery",
"@npm//@types/jqueryui",
],
)
filegroup(
name = "aqt_es5",
srcs = ["aqt"],
output_group = "es5_sources",
)
2021-01-31 14:15:03 +01:00
copy_page(
2021-01-30 17:54:07 +01:00
name = "editor",
2021-01-31 14:15:03 +01:00
srcs = [
"editor.js",
2021-01-30 17:54:07 +01:00
],
2021-01-31 14:15:03 +01:00
package = "//ts/editor",
2021-01-30 17:54:07 +01:00
)
filegroup(
name = "js",
srcs = [
"aqt_es5",
2021-01-30 17:54:07 +01:00
"editor",
"mathjax.js",
"//qt/aqt/data/web/js/vendor",
],
visibility = ["//qt:__subpackages__"],
)
prettier_test(
name = "format_check",
srcs = glob(["*.ts", "*.js"]),
)
# source files need fixing first
# eslint_test(
# name = "eslint",
# srcs = glob(["*.ts"]),
# )
2020-11-30 06:15:37 +01:00
2021-01-30 17:54:07 +01:00
exports_files([
"mathjax.js",
"tsconfig.json",
])