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/domlib", "//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", ], )