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

89 lines
1.7 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:compile_sass.bzl", "compile_sass")
load("//ts:typescript.bzl", "typescript")
load("//ts:jest.bzl", "jest_test")
compile_sass(
srcs = ["change-notetype-base.scss"],
group = "base_css",
visibility = ["//visibility:public"],
deps = [
"//sass:base_lib",
"//sass:scrollbar_lib",
"//sass/bootstrap",
],
)
compile_svelte()
typescript(
name = "index",
deps = [
":svelte",
"//ts/components",
"//ts/lib",
"//ts/sveltelib",
"@npm//@fluent",
"@npm//@types/jest",
"@npm//lodash-es",
"@npm//svelte",
"@npm//svelte2tsx",
],
)
esbuild(
name = "change-notetype",
args = {
"globalName": "anki",
"loader": {".svg": "text"},
},
entry_point = "index.ts",
output_css = "change-notetype.css",
visibility = ["//visibility:public"],
deps = [
":base_css",
":index",
":svelte",
"//ts/components",
"//ts/lib",
"//ts/sveltelib",
"@npm//bootstrap",
"@npm//marked",
"@npm//protobufjs",
],
)
exports_files(["change-notetype.html"])
# Tests
################
prettier_test()
eslint_test()
svelte_check(
name = "svelte_check",
srcs = glob([
"*.ts",
"*.svelte",
]) + [
"//sass:button_mixins_lib",
"//sass/bootstrap",
"@npm//@types/bootstrap",
"@npm//@types/lodash-es",
"@npm//@types/marked",
"//ts/components",
],
)
jest_test(
protobuf = True,
deps = [
":index",
],
)