anki/ts/graphs/BUILD.bazel
Matthias Metelka ee9af871b7
Use custom scrollbar in stats screen, use grid layout and tweak CSS (#2154)
* Include base styles in graphs-base.scss

This includes the custom scrollbar styles, which were missing on the stats page.

* Set responsive grid layout on GraphsPage, use TitledContainer component

+ use global button style, tweak input appearance and other small changes

* Improve margins on GraphsPage
2022-11-02 18:23:08 +10:00

78 lines
1.4 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:generate_page.bzl", "generate_page")
load("//ts:compile_sass.bzl", "compile_sass")
load("//ts:typescript.bzl", "typescript")
generate_page(page = "graphs")
compile_sass(
srcs = ["graphs-base.scss"],
group = "base_css",
visibility = ["//visibility:public"],
deps = [
"//sass:base_lib",
"//sass:button_mixins_lib",
"//sass:scrollbar_lib",
],
)
_ts_deps = [
"//ts/lib",
"//ts/components",
"//ts/sveltelib",
"@npm//@fluent",
"@npm//@types/d3",
"@npm//@types/lodash",
"@npm//d3",
"@npm//lodash-es",
"@npm//svelte",
]
compile_svelte(
deps = _ts_deps,
)
typescript(
name = "index",
deps = _ts_deps + [
":svelte",
],
)
esbuild(
name = "graphs",
args = {
"globalName": "anki",
},
entry_point = "index.ts",
output_css = "graphs.css",
visibility = ["//visibility:public"],
deps = [
":base_css",
":index",
":svelte",
],
)
# Tests
################
prettier_test()
eslint_test()
svelte_check(
name = "svelte_check",
srcs = glob([
"*.ts",
"*.svelte",
]) + [
"//sass:button_mixins_lib",
"//ts/lib",
"//ts/sveltelib",
],
)