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