anki/ts/editable/BUILD.bazel
Henrik Giesel c64bac57a6
Put sass into repo directory (#1409)
Fix Sass build
2021-10-09 10:25:03 +10:00

68 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_scss",
visibility = ["//visibility:public"],
deps = [
"//sass:scrollbar_lib",
"//sass/codemirror",
],
)
compile_svelte()
typescript(
name = "editable",
deps = [
":svelte",
"//ts/components",
"//ts/lib",
"//ts/sveltelib",
"@npm//mathjax",
"@npm//mathjax-full",
"@npm//svelte",
],
)
esbuild(
name = "editable-build",
args = {
"loader": {".svg": "text"},
},
entry_point = "index.ts",
output_css = "editable-build.css",
visibility = ["//visibility:public"],
deps = [
"editable",
"editable_scss",
"//ts/components",
"@npm//@mdi",
"@npm//protobufjs",
],
)
# Tests
################
prettier_test()
eslint_test()
svelte_check(
name = "svelte_check",
srcs = glob([
"*.ts",
"*.svelte",
]) + [
"//ts/components",
],
)