load("@npm//@bazel/typescript:index.bzl", "ts_library") 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") compile_sass( group = "base_css", srcs = ["editor.scss", "editable.scss"], deps = [ "//ts/sass:base_lib", "//ts/sass:buttons_lib", "//ts/sass:scrollbar_lib", ], visibility = ["//visibility:public"], ) ts_library( name = "editor_ts", srcs = glob(["*.ts"]), tsconfig = "//ts:tsconfig.json", deps = [ "//ts:image_module_support", "//ts/html-filter", ], ) copy_bootstrap_icons( name = "bootstrap-icons", icons = ["pin-angle.svg"], ) esbuild( name = "editor", args = [ "--loader:.svg=text", "--resolve-extensions=.mjs,.js", "--log-level=warning", ], entry_point = "index_wrapper.ts", visibility = ["//visibility:public"], deps = [ ":bootstrap-icons", ":editor_ts", "base_css", ], ) # Tests ################ prettier_test( name = "format_check", srcs = glob([ "*.ts", ]), ) # eslint_test( # name = "eslint", # srcs = glob( # [ # "*.ts", # ], # ), # )