Anki/ts/editor/BUILD.bazel
Henrik Giesel 09c29219b4
Several CSS fixes - Editor Cleanup (#1470)
* Refactor editor css, fix editor button highlight

- Avoid using webview.css
- Move more buttons css into button_mixins

* Fix DropdownItem appearance

* Fix the visuals of tags

* Make dropdown font slightly smaller

* Give SelectOption a background color

* Move some css from deck-options-base to CardStateCustomizer

* Avoid using core.scss for CardStats

* Avoid using sass/core in congrats package

* Inline core.scss into webview.scss

* Include fusion-vars for base.scss

* need to keep core.scss around for now (dae)
2021-10-31 08:29:22 +10:00

83 lines
1.7 KiB
Text

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:vendor.bzl", "copy_bootstrap_icons")
load("//ts:compile_sass.bzl", "compile_sass")
load("//ts:typescript.bzl", "typescript")
compile_sass(
srcs = [
"editor-base.scss",
"legacy.scss",
],
group = "editor_css",
visibility = ["//visibility:public"],
deps = [
"//sass:base_lib",
"//sass:button_mixins_lib",
"//sass:scrollbar_lib",
],
)
_ts_deps = [
"//ts/components",
"//ts/editable:editable_ts",
"//ts/html-filter",
"//ts/lib",
"//ts/sveltelib",
"@npm//@fluent",
"@npm//@types/codemirror",
"@npm//codemirror",
"@npm//svelte",
]
compile_svelte(deps = _ts_deps)
typescript(
name = "editor_ts",
deps = _ts_deps + [
":svelte",
],
)
esbuild(
name = "editor",
args = {
"loader": {".svg": "text"},
},
entry_point = "index_wrapper.ts",
output_css = "editor.css",
visibility = ["//visibility:public"],
deps = [
":editor_ts",
":editor_css",
"@npm//@mdi",
"@npm//bootstrap-icons",
"@npm//protobufjs",
"//sass:button_mixins_lib",
],
)
# Tests
################
prettier_test()
eslint_test()
svelte_check(
name = "svelte_check",
srcs = glob([
"**/*.ts",
"**/*.svelte",
]) + [
"//sass:button_mixins_lib",
"//sass/bootstrap",
"//ts/components",
"//ts/editable:editable_ts",
"@npm//@types/bootstrap",
"@npm//@types/codemirror",
"@npm//codemirror",
],
)