mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Include editor-toolbar as a library in editor
This commit is contained in:
parent
e60e784152
commit
b1de095162
15 changed files with 81 additions and 100 deletions
|
@ -26,20 +26,11 @@ copy_files_into_group(
|
||||||
package = "//ts/editor",
|
package = "//ts/editor",
|
||||||
)
|
)
|
||||||
|
|
||||||
copy_files_into_group(
|
|
||||||
name = "editor-toolbar",
|
|
||||||
srcs = [
|
|
||||||
"editor-toolbar.css",
|
|
||||||
],
|
|
||||||
package = "//ts/editor-toolbar",
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "css",
|
name = "css",
|
||||||
srcs = [
|
srcs = [
|
||||||
"css_local",
|
"css_local",
|
||||||
"editor",
|
"editor",
|
||||||
"editor-toolbar",
|
|
||||||
],
|
],
|
||||||
visibility = ["//qt:__subpackages__"],
|
visibility = ["//qt:__subpackages__"],
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,20 +37,11 @@ copy_files_into_group(
|
||||||
package = "//ts/editor",
|
package = "//ts/editor",
|
||||||
)
|
)
|
||||||
|
|
||||||
copy_files_into_group(
|
|
||||||
name = "editor-toolbar",
|
|
||||||
srcs = [
|
|
||||||
"editor-toolbar.js",
|
|
||||||
],
|
|
||||||
package = "//ts/editor-toolbar",
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "js",
|
name = "js",
|
||||||
srcs = [
|
srcs = [
|
||||||
"aqt_es5",
|
"aqt_es5",
|
||||||
"editor",
|
"editor",
|
||||||
"editor-toolbar",
|
|
||||||
"mathjax.js",
|
"mathjax.js",
|
||||||
"//qt/aqt/data/web/js/vendor",
|
"//qt/aqt/data/web/js/vendor",
|
||||||
],
|
],
|
||||||
|
|
|
@ -141,13 +141,11 @@ class Editor:
|
||||||
_html % (bgcol, tr.editing_show_duplicates()),
|
_html % (bgcol, tr.editing_show_duplicates()),
|
||||||
css=[
|
css=[
|
||||||
"css/editor.css",
|
"css/editor.css",
|
||||||
"css/editor-toolbar.css",
|
|
||||||
],
|
],
|
||||||
js=[
|
js=[
|
||||||
"js/vendor/jquery.min.js",
|
"js/vendor/jquery.min.js",
|
||||||
"js/vendor/protobuf.min.js",
|
"js/vendor/protobuf.min.js",
|
||||||
"js/editor.js",
|
"js/editor.js",
|
||||||
"js/editor-toolbar.js",
|
|
||||||
],
|
],
|
||||||
context=self,
|
context=self,
|
||||||
default_css=False,
|
default_css=False,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
|
||||||
|
|
||||||
def compile_sass(group, srcs, visibility, deps):
|
def compile_sass(group, srcs, deps = [], visibility = ["//visibility:private"]):
|
||||||
css_files = []
|
css_files = []
|
||||||
for scss_file in srcs:
|
for scss_file in srcs:
|
||||||
base = scss_file.replace(".scss", "")
|
base = scss_file.replace(".scss", "")
|
||||||
|
|
|
@ -17,6 +17,7 @@ compile_svelte(
|
||||||
"//ts/sass:button_mixins_lib",
|
"//ts/sass:button_mixins_lib",
|
||||||
"//ts/sass/bootstrap",
|
"//ts/sass/bootstrap",
|
||||||
],
|
],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
compile_sass(
|
compile_sass(
|
||||||
|
@ -26,42 +27,11 @@ compile_sass(
|
||||||
"legacy.scss",
|
"legacy.scss",
|
||||||
],
|
],
|
||||||
group = "local_css",
|
group = "local_css",
|
||||||
visibility = ["//visibility:public"],
|
|
||||||
deps = [
|
deps = [
|
||||||
"//ts/sass:button_mixins_lib",
|
"//ts/sass:button_mixins_lib",
|
||||||
"//ts/sass/bootstrap",
|
"//ts/sass/bootstrap",
|
||||||
],
|
],
|
||||||
)
|
visibility = ["//visibility:public"],
|
||||||
|
|
||||||
ts_library(
|
|
||||||
name = "index",
|
|
||||||
srcs = ["index.ts"],
|
|
||||||
deps = [
|
|
||||||
"EditorToolbar",
|
|
||||||
"lib",
|
|
||||||
"//ts/lib",
|
|
||||||
"//ts/sveltelib",
|
|
||||||
"@npm//svelte",
|
|
||||||
"@npm//svelte2tsx",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
ts_library(
|
|
||||||
name = "lib",
|
|
||||||
srcs = glob(
|
|
||||||
["*.ts"],
|
|
||||||
exclude = ["index.ts"],
|
|
||||||
),
|
|
||||||
deps = [
|
|
||||||
"//ts:image_module_support",
|
|
||||||
"//ts/lib",
|
|
||||||
"//ts/lib:backend_proto",
|
|
||||||
"//ts/sveltelib",
|
|
||||||
"@npm//@popperjs/core",
|
|
||||||
"@npm//@types/bootstrap",
|
|
||||||
"@npm//bootstrap",
|
|
||||||
"@npm//svelte",
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
copy_bootstrap_icons(
|
copy_bootstrap_icons(
|
||||||
|
@ -88,6 +58,7 @@ copy_bootstrap_icons(
|
||||||
"text-indent-left.svg",
|
"text-indent-left.svg",
|
||||||
"text-indent-right.svg",
|
"text-indent-right.svg",
|
||||||
],
|
],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
copy_mdi_icons(
|
copy_mdi_icons(
|
||||||
|
@ -99,35 +70,28 @@ copy_mdi_icons(
|
||||||
"code-brackets.svg",
|
"code-brackets.svg",
|
||||||
"xml.svg",
|
"xml.svg",
|
||||||
],
|
],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
esbuild(
|
ts_library(
|
||||||
name = "editor-toolbar",
|
name = "editor-toolbar",
|
||||||
srcs = [
|
module_name = "editor-toolbar",
|
||||||
"//ts:protobuf-shim.js",
|
srcs = glob(
|
||||||
],
|
["*.ts"],
|
||||||
args = [
|
exclude = ["*.test.ts"],
|
||||||
"--global-name=editorToolbar",
|
),
|
||||||
"--inject:$(location //ts:protobuf-shim.js)",
|
tsconfig = "//ts:tsconfig.json",
|
||||||
"--resolve-extensions=.mjs,.js",
|
|
||||||
"--loader:.svg=text",
|
|
||||||
"--log-level=warning",
|
|
||||||
],
|
|
||||||
entry_point = "index.ts",
|
|
||||||
external = [
|
|
||||||
"protobufjs/light",
|
|
||||||
],
|
|
||||||
output_css = "editor-toolbar.css",
|
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
"//ts/lib",
|
"//ts/lib",
|
||||||
"//ts/lib:backend_proto",
|
"//ts/lib:backend_proto",
|
||||||
"//ts:image_module_support",
|
"//ts:image_module_support",
|
||||||
"index",
|
"//ts/sveltelib",
|
||||||
"bootstrap-icons",
|
"@npm//@popperjs/core",
|
||||||
"mdi-icons",
|
"@npm//@types/bootstrap",
|
||||||
"local_css",
|
"@npm//bootstrap",
|
||||||
] + svelte_names,
|
"@npm//svelte",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
|
|
|
@ -202,9 +202,10 @@ class EditorToolbar extends HTMLElement {
|
||||||
|
|
||||||
customElements.define("anki-editor-toolbar", EditorToolbar);
|
customElements.define("anki-editor-toolbar", EditorToolbar);
|
||||||
|
|
||||||
/* Exports for editor
|
/* Exports for editor/
|
||||||
* @ts-expect-error */
|
/* @ts-expect-error */
|
||||||
export { updateActiveButtons, clearActiveButtons } from "./CommandIconButton.svelte";
|
export { updateActiveButtons, clearActiveButtons } from "./CommandIconButton.svelte";
|
||||||
|
/* @ts-expect-error */
|
||||||
export { enableButtons, disableButtons } from "./EditorToolbar.svelte";
|
export { enableButtons, disableButtons } from "./EditorToolbar.svelte";
|
||||||
|
|
||||||
/* Exports for add-ons */
|
/* Exports for add-ons */
|
||||||
|
|
|
@ -8,7 +8,17 @@ load("//ts:compile_sass.bzl", "compile_sass")
|
||||||
compile_sass(
|
compile_sass(
|
||||||
srcs = [
|
srcs = [
|
||||||
"editable.scss",
|
"editable.scss",
|
||||||
"editor.scss",
|
],
|
||||||
|
group = "editable_scss",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//ts/sass:scrollbar_lib",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
compile_sass(
|
||||||
|
srcs = [
|
||||||
|
"fields.scss",
|
||||||
],
|
],
|
||||||
group = "base_css",
|
group = "base_css",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
|
@ -26,6 +36,7 @@ ts_library(
|
||||||
deps = [
|
deps = [
|
||||||
"//ts:image_module_support",
|
"//ts:image_module_support",
|
||||||
"//ts/html-filter",
|
"//ts/html-filter",
|
||||||
|
"//ts/editor-toolbar",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -36,17 +47,42 @@ copy_bootstrap_icons(
|
||||||
|
|
||||||
esbuild(
|
esbuild(
|
||||||
name = "editor",
|
name = "editor",
|
||||||
|
srcs = [
|
||||||
|
"//ts:protobuf-shim.js",
|
||||||
|
],
|
||||||
args = [
|
args = [
|
||||||
"--loader:.svg=text",
|
"--loader:.svg=text",
|
||||||
|
"--inject:$(location //ts:protobuf-shim.js)",
|
||||||
"--resolve-extensions=.mjs,.js",
|
"--resolve-extensions=.mjs,.js",
|
||||||
"--log-level=warning",
|
"--log-level=warning",
|
||||||
],
|
],
|
||||||
|
output_css = "editor.css",
|
||||||
|
external = [
|
||||||
|
"protobufjs/light",
|
||||||
|
],
|
||||||
entry_point = "index_wrapper.ts",
|
entry_point = "index_wrapper.ts",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
"base_css",
|
"base_css",
|
||||||
":bootstrap-icons",
|
"bootstrap-icons",
|
||||||
":editor_ts",
|
"editor_ts",
|
||||||
|
"//ts/editor-toolbar:local_css",
|
||||||
|
"//ts/editor-toolbar:bootstrap-icons",
|
||||||
|
"//ts/editor-toolbar:mdi-icons",
|
||||||
|
"//ts/editor-toolbar:ButtonDropdown",
|
||||||
|
"//ts/editor-toolbar:ButtonGroup",
|
||||||
|
"//ts/editor-toolbar:IconButton",
|
||||||
|
"//ts/editor-toolbar:LabelButton",
|
||||||
|
"//ts/editor-toolbar:SelectButton",
|
||||||
|
"//ts/editor-toolbar:SelectOption",
|
||||||
|
"//ts/editor-toolbar:RawButton",
|
||||||
|
"//ts/editor-toolbar:EditorToolbar",
|
||||||
|
"//ts/editor-toolbar:CommandIconButton",
|
||||||
|
"//ts/editor-toolbar:WithDropdownMenu",
|
||||||
|
"//ts/editor-toolbar:DropdownItem",
|
||||||
|
"//ts/editor-toolbar:DropdownMenu",
|
||||||
|
"//ts/editor-toolbar:SquareButton",
|
||||||
|
"//ts/editor-toolbar:ColorPicker",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import type { Editable } from "./editable";
|
import type { Editable } from "./editable";
|
||||||
|
|
||||||
|
import { updateActiveButtons } from "editor-toolbar";
|
||||||
import { bridgeCommand } from "./lib";
|
import { bridgeCommand } from "./lib";
|
||||||
import { onInput, onKey, onKeyUp } from "./inputHandlers";
|
import { onInput, onKey, onKeyUp } from "./inputHandlers";
|
||||||
import { onFocus, onBlur } from "./focusHandlers";
|
import { onFocus, onBlur } from "./focusHandlers";
|
||||||
|
@ -59,8 +60,7 @@ export class EditingArea extends HTMLDivElement {
|
||||||
this.addEventListener("paste", onPaste);
|
this.addEventListener("paste", onPaste);
|
||||||
this.addEventListener("copy", onCutOrCopy);
|
this.addEventListener("copy", onCutOrCopy);
|
||||||
this.addEventListener("oncut", onCutOrCopy);
|
this.addEventListener("oncut", onCutOrCopy);
|
||||||
// @ts-expect-error
|
this.addEventListener("mouseup", updateActiveButtons);
|
||||||
this.addEventListener("mouseup", editorToolbar.updateActiveButtons);
|
|
||||||
|
|
||||||
const baseStyleSheet = this.baseStyle.sheet as CSSStyleSheet;
|
const baseStyleSheet = this.baseStyle.sheet as CSSStyleSheet;
|
||||||
baseStyleSheet.insertRule("anki-editable {}", 0);
|
baseStyleSheet.insertRule("anki-editable {}", 0);
|
||||||
|
@ -75,8 +75,7 @@ export class EditingArea extends HTMLDivElement {
|
||||||
this.removeEventListener("paste", onPaste);
|
this.removeEventListener("paste", onPaste);
|
||||||
this.removeEventListener("copy", onCutOrCopy);
|
this.removeEventListener("copy", onCutOrCopy);
|
||||||
this.removeEventListener("oncut", onCutOrCopy);
|
this.removeEventListener("oncut", onCutOrCopy);
|
||||||
// @ts-expect-error
|
this.removeEventListener("mouseup", updateActiveButtons);
|
||||||
this.removeEventListener("mouseup", editorToolbar.updateActiveButtons);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize(color: string, content: string): void {
|
initialize(color: string, content: string): void {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
import { enableButtons, disableButtons } from "editor-toolbar";
|
||||||
import type { EditingArea } from "./editingArea";
|
import type { EditingArea } from "./editingArea";
|
||||||
|
|
||||||
import { saveField } from "./changeTimer";
|
import { saveField } from "./changeTimer";
|
||||||
|
@ -10,8 +11,7 @@ export function onFocus(evt: FocusEvent): void {
|
||||||
const currentField = evt.currentTarget as EditingArea;
|
const currentField = evt.currentTarget as EditingArea;
|
||||||
currentField.focusEditable();
|
currentField.focusEditable();
|
||||||
bridgeCommand(`focus:${currentField.ord}`);
|
bridgeCommand(`focus:${currentField.ord}`);
|
||||||
// @ts-expect-error
|
enableButtons();
|
||||||
editorToolbar.enableButtons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function onBlur(evt: FocusEvent): void {
|
export function onBlur(evt: FocusEvent): void {
|
||||||
|
@ -19,6 +19,5 @@ export function onBlur(evt: FocusEvent): void {
|
||||||
const currentFieldUnchanged = previousFocus === document.activeElement;
|
const currentFieldUnchanged = previousFocus === document.activeElement;
|
||||||
|
|
||||||
saveField(previousFocus, currentFieldUnchanged ? "key" : "blur");
|
saveField(previousFocus, currentFieldUnchanged ? "key" : "blur");
|
||||||
// @ts-expect-error
|
disableButtons();
|
||||||
editorToolbar.disableButtons();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
import { filterHTML } from "html-filter";
|
import { filterHTML } from "html-filter";
|
||||||
|
import { updateActiveButtons, disableButtons } from "editor-toolbar";
|
||||||
|
import "./fields.css";
|
||||||
|
|
||||||
import { caretToEnd } from "./helpers";
|
import { caretToEnd } from "./helpers";
|
||||||
import { saveField } from "./changeTimer";
|
import { saveField } from "./changeTimer";
|
||||||
|
@ -24,6 +26,7 @@ declare global {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
import "editor-toolbar";
|
||||||
customElements.define("anki-editable", Editable);
|
customElements.define("anki-editable", Editable);
|
||||||
customElements.define("anki-editing-area", EditingArea, { extends: "div" });
|
customElements.define("anki-editing-area", EditingArea, { extends: "div" });
|
||||||
customElements.define("anki-label-container", LabelContainer, { extends: "div" });
|
customElements.define("anki-label-container", LabelContainer, { extends: "div" });
|
||||||
|
@ -41,8 +44,7 @@ export function focusField(n: number): void {
|
||||||
if (field) {
|
if (field) {
|
||||||
field.editingArea.focusEditable();
|
field.editingArea.focusEditable();
|
||||||
caretToEnd(field.editingArea);
|
caretToEnd(field.editingArea);
|
||||||
// @ts-expect-error
|
updateActiveButtons();
|
||||||
editorToolbar.updateActiveButtons();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,8 +124,7 @@ export function setFields(fields: [string, string][]): void {
|
||||||
|
|
||||||
if (!getCurrentField()) {
|
if (!getCurrentField()) {
|
||||||
// when initial focus of the window is not on editor (e.g. browser)
|
// when initial focus of the window is not on editor (e.g. browser)
|
||||||
// @ts-expect-error
|
disableButtons();
|
||||||
editorToolbar.disableButtons();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +159,6 @@ export function setFormat(cmd: string, arg?: any, nosave: boolean = false): void
|
||||||
document.execCommand(cmd, false, arg);
|
document.execCommand(cmd, false, arg);
|
||||||
if (!nosave) {
|
if (!nosave) {
|
||||||
saveField(getCurrentField() as EditingArea, "key");
|
saveField(getCurrentField() as EditingArea, "key");
|
||||||
// @ts-expect-error
|
updateActiveButtons();
|
||||||
editorToolbar.updateActiveButtons();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright: Ankitects Pty Ltd and contributors
|
// Copyright: Ankitects Pty Ltd and contributors
|
||||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
import { updateActiveButtons } from "editor-toolbar";
|
||||||
import { EditingArea } from "./editingArea";
|
import { EditingArea } from "./editingArea";
|
||||||
import { caretToEnd, nodeIsElement } from "./helpers";
|
import { caretToEnd, nodeIsElement } from "./helpers";
|
||||||
import { triggerChangeTimer } from "./changeTimer";
|
import { triggerChangeTimer } from "./changeTimer";
|
||||||
|
@ -37,8 +38,7 @@ const getParagraph = getAnchorParent(
|
||||||
export function onInput(event: Event): void {
|
export function onInput(event: Event): void {
|
||||||
// make sure IME changes get saved
|
// make sure IME changes get saved
|
||||||
triggerChangeTimer(event.currentTarget as EditingArea);
|
triggerChangeTimer(event.currentTarget as EditingArea);
|
||||||
// @ts-ignore
|
updateActiveButtons();
|
||||||
editorToolbar.updateActiveButtons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function onKey(evt: KeyboardEvent): void {
|
export function onKey(evt: KeyboardEvent): void {
|
||||||
|
@ -89,8 +89,7 @@ globalThis.addEventListener("keydown", (evt: KeyboardEvent) => {
|
||||||
const newFocusTarget = evt.target;
|
const newFocusTarget = evt.target;
|
||||||
if (newFocusTarget instanceof EditingArea) {
|
if (newFocusTarget instanceof EditingArea) {
|
||||||
caretToEnd(newFocusTarget);
|
caretToEnd(newFocusTarget);
|
||||||
// @ts-ignore
|
updateActiveButtons();
|
||||||
editorToolbar.updateActiveButtons();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ once: true }
|
{ once: true }
|
||||||
|
|
|
@ -5,11 +5,11 @@ load("//ts:eslint.bzl", "eslint_test")
|
||||||
|
|
||||||
ts_library(
|
ts_library(
|
||||||
name = "html-filter",
|
name = "html-filter",
|
||||||
|
module_name = "html-filter",
|
||||||
srcs = glob(
|
srcs = glob(
|
||||||
["*.ts"],
|
["*.ts"],
|
||||||
exclude = ["*.test.ts"],
|
exclude = ["*.test.ts"],
|
||||||
),
|
),
|
||||||
module_name = "html-filter",
|
|
||||||
tsconfig = "//ts:tsconfig.json",
|
tsconfig = "//ts:tsconfig.json",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [],
|
deps = [],
|
||||||
|
|
|
@ -63,17 +63,19 @@ svelte = rule(
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
def compile_svelte(name, srcs, deps = []):
|
def compile_svelte(name, srcs, deps = [], visibility = ["//visibility:private"]):
|
||||||
for src in srcs:
|
for src in srcs:
|
||||||
svelte(
|
svelte(
|
||||||
name = src.replace(".svelte", ""),
|
name = src.replace(".svelte", ""),
|
||||||
entry_point = src,
|
entry_point = src,
|
||||||
deps = deps,
|
deps = deps,
|
||||||
|
visibility = visibility,
|
||||||
)
|
)
|
||||||
|
|
||||||
native.filegroup(
|
native.filegroup(
|
||||||
name = name,
|
name = name,
|
||||||
srcs = srcs,
|
srcs = srcs,
|
||||||
|
visibility = visibility,
|
||||||
)
|
)
|
||||||
|
|
||||||
def svelte_check(name = "svelte_check", srcs = []):
|
def svelte_check(name = "svelte_check", srcs = []):
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
"paths": {
|
"paths": {
|
||||||
"anki/*": ["../bazel-bin/ts/lib/*"],
|
"anki/*": ["../bazel-bin/ts/lib/*"],
|
||||||
"sveltelib/*": ["../bazel-bin/ts/sveltelib/*"],
|
"sveltelib/*": ["../bazel-bin/ts/sveltelib/*"],
|
||||||
"html-filter/*": ["../bazel-bin/ts/html-filter/*"]
|
"html-filter/*": ["../bazel-bin/ts/html-filter/*"],
|
||||||
|
"editor-toolbar/*": ["../bazel-bin/ts/editor-toolbar/*"]
|
||||||
},
|
},
|
||||||
"importsNotUsedAsValues": "error",
|
"importsNotUsedAsValues": "error",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
|
|
Loading…
Reference in a new issue