mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
add reviewer_extras.js back
This commit is contained in:
parent
a6fbb1227a
commit
f3b8022a4c
2 changed files with 33 additions and 2 deletions
|
@ -14,10 +14,13 @@ compile_sass(
|
|||
deps = [],
|
||||
)
|
||||
|
||||
|
||||
ts_library(
|
||||
name = "reviewer_ts",
|
||||
srcs = glob(["*.ts"]),
|
||||
srcs = glob(
|
||||
["*.ts"],
|
||||
exclude = ["reviewer_extras.ts"],
|
||||
),
|
||||
module_name = "reviewer",
|
||||
deps = [
|
||||
"//ts/lib",
|
||||
"//ts/lib:backend_proto",
|
||||
|
@ -42,6 +45,25 @@ esbuild(
|
|||
],
|
||||
)
|
||||
|
||||
esbuild(
|
||||
name = "reviewer_extras",
|
||||
srcs = [
|
||||
"reviewer_extras.ts",
|
||||
],
|
||||
args = [
|
||||
"--resolve-extensions=.mjs,.js",
|
||||
"--log-level=warning",
|
||||
],
|
||||
entry_point = "reviewer_extras.ts",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":reviewer_ts",
|
||||
"//ts/lib",
|
||||
"//ts/lib:backend_proto",
|
||||
"@npm//protobufjs",
|
||||
],
|
||||
)
|
||||
|
||||
# Tests
|
||||
################
|
||||
|
||||
|
|
9
ts/reviewer/reviewer_extras.ts
Normal file
9
ts/reviewer/reviewer_extras.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Copyright: Ankitects Pty Ltd and contributors
|
||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
// A standalone bundle that adds mutateNextCardStates to the anki namespace.
|
||||
// When all clients are using reviewer.js directly, we can get rid of this.
|
||||
|
||||
import { mutateNextCardStates } from "reviewer/answering";
|
||||
|
||||
globalThis.anki.mutateNextCardStates = mutateNextCardStates;
|
Loading…
Reference in a new issue