264561cd0d
* Redesign deck config, swap tooltips for help modals, link to manual * Replace canvas-inset with canvas-code for custom scheduling * Make section header link to manual too * Include elevation Sass library * Remove two unused exports * Fix tabbed spinboxes * Update ftl/core/deck-config.ftl * Update ftl/core/deck-config.ftl * Fix format * Make border-radius and box-shadow more subtle * Fix margin for vertical aspect ratio * Make direct hover on info badge apply effect instantly * Add redirect line to manual underneath chapter
109 lines
2.2 KiB
Python
109 lines
2.2 KiB
Python
load("//ts:prettier.bzl", "prettier_test")
|
|
load("//ts:eslint.bzl", "eslint_test")
|
|
load("//ts/svelte:svelte.bzl", "compile_svelte", "svelte_check")
|
|
load("//ts:esbuild.bzl", "esbuild")
|
|
load("//ts:generate_page.bzl", "generate_page")
|
|
load("//ts:compile_sass.bzl", "compile_sass")
|
|
load("//ts:jest.bzl", "jest_test")
|
|
load("//ts:typescript.bzl", "typescript")
|
|
|
|
generate_page(page = "deck-options")
|
|
|
|
compile_sass(
|
|
srcs = ["deck-options-base.scss"],
|
|
group = "base_css",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//sass:base_lib",
|
|
"//sass:breakpoints_lib",
|
|
"//sass:scrollbar_lib",
|
|
"//sass:night_mode_lib",
|
|
"//sass:elevation_lib",
|
|
"//sass/bootstrap",
|
|
],
|
|
)
|
|
|
|
_ts_deps = [
|
|
"//ts/components",
|
|
"//ts/lib",
|
|
"//ts/sveltelib",
|
|
"@npm//@fluent",
|
|
"@npm//@popperjs",
|
|
"@npm//@types/jest",
|
|
"@npm//@mdi",
|
|
"@npm//bootstrap-icons",
|
|
"@npm//bootstrap",
|
|
"@npm//lodash-es",
|
|
"@npm//svelte",
|
|
"@npm//marked",
|
|
]
|
|
|
|
compile_svelte(
|
|
deps = _ts_deps + [
|
|
"//sass:base_lib",
|
|
"//sass:breakpoints_lib",
|
|
"//sass:scrollbar_lib",
|
|
"//sass:night_mode_lib",
|
|
"//sass:elevation_lib",
|
|
"//sass/bootstrap",
|
|
],
|
|
)
|
|
|
|
typescript(
|
|
name = "index",
|
|
deps = _ts_deps + [
|
|
":svelte",
|
|
],
|
|
)
|
|
|
|
esbuild(
|
|
name = "deck-options",
|
|
args = {
|
|
"globalName": "anki",
|
|
"loader": {".svg": "text"},
|
|
},
|
|
entry_point = "index.ts",
|
|
output_css = "deck-options.css",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":base_css",
|
|
":index",
|
|
":svelte",
|
|
],
|
|
)
|
|
|
|
# Tests
|
|
################
|
|
|
|
prettier_test()
|
|
|
|
eslint_test()
|
|
|
|
svelte_check(
|
|
name = "svelte_check",
|
|
srcs = glob([
|
|
"*.ts",
|
|
"*.svelte",
|
|
]) + [
|
|
"//sass:base_lib",
|
|
"//sass:button_mixins_lib",
|
|
"//sass:scrollbar_lib",
|
|
"//sass:breakpoints_lib",
|
|
"//sass:night_mode_lib",
|
|
"//sass:elevation_lib",
|
|
"//sass/bootstrap",
|
|
"//ts/components",
|
|
"//ts/sveltelib:sveltelib_pkg",
|
|
"@npm//@types/bootstrap",
|
|
"@npm//@types/lodash-es",
|
|
"@npm//@types/marked",
|
|
],
|
|
)
|
|
|
|
jest_test(
|
|
protobuf = True,
|
|
deps = [
|
|
":index",
|
|
],
|
|
)
|