3b8aa97396
* Remove custom config and use tex-chtml-full for editor Mathjax * Add mathjax package in /ts * Share mathjax config between tex-svg and tex-chtml * Use "[+]" in Mathjax config again * Remove mention of MathJaxReady * Satisfy eslint
72 lines
1.3 KiB
Python
72 lines
1.3 KiB
Python
load("//ts/svelte:svelte.bzl", "compile_svelte", "svelte_check")
|
|
load("//ts:prettier.bzl", "prettier_test")
|
|
load("//ts:eslint.bzl", "eslint_test")
|
|
load("//ts:esbuild.bzl", "esbuild")
|
|
load("//ts:compile_sass.bzl", "compile_sass")
|
|
load("//ts:typescript.bzl", "typescript")
|
|
|
|
compile_sass(
|
|
srcs = [
|
|
"editable-base.scss",
|
|
],
|
|
group = "editable_css",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//sass:scrollbar_lib",
|
|
],
|
|
)
|
|
|
|
_ts_deps = [
|
|
"//ts/components",
|
|
"//ts/lib",
|
|
"//ts/domlib",
|
|
"//ts/sveltelib",
|
|
"//ts/mathjax:mathjax_ts",
|
|
"@npm//mathjax",
|
|
"@npm//svelte",
|
|
]
|
|
|
|
compile_svelte(deps = _ts_deps)
|
|
|
|
typescript(
|
|
name = "editable_ts",
|
|
deps = _ts_deps + [
|
|
":svelte",
|
|
],
|
|
)
|
|
|
|
esbuild(
|
|
name = "editable",
|
|
args = {
|
|
"loader": {".svg": "text"},
|
|
},
|
|
entry_point = "index.ts",
|
|
output_css = "editable.css",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":editable_css",
|
|
":editable_ts",
|
|
"//ts/components",
|
|
"@npm//@mdi",
|
|
"@npm//protobufjs",
|
|
],
|
|
)
|
|
|
|
# Tests
|
|
################
|
|
|
|
prettier_test()
|
|
|
|
eslint_test()
|
|
|
|
svelte_check(
|
|
name = "svelte_check",
|
|
srcs = glob([
|
|
"*.ts",
|
|
"*.svelte",
|
|
]) + [
|
|
"//ts/components",
|
|
"//ts/domlib",
|
|
],
|
|
)
|