mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00

The API extractor integration isn't set up properly yet, so I had to manually generate the d.ts bundle and copy it into the add-on: cd ts/runtime bazel run extract_api cp ../../.bazel/bin/ts/runtime/extract_api.sh.runfiles/ankidesktop/ts/runtime/dist/anki.d.ts \ $c/anki_new_format_pack/ts/anki-dts/runtime.d.ts
42 lines
762 B
Text
42 lines
762 B
Text
load("//ts:prettier.bzl", "prettier_test")
|
|
load("//ts:eslint.bzl", "eslint_test")
|
|
load("//ts:typescript.bzl", "typescript")
|
|
load("@npm//@microsoft/api-extractor:index.bzl", "api_extractor")
|
|
|
|
typescript(
|
|
name = "runtime",
|
|
deps = [
|
|
"//ts/editor",
|
|
],
|
|
)
|
|
|
|
filegroup(
|
|
name = "runtime_dts",
|
|
srcs = [":runtime"],
|
|
output_group = "types",
|
|
)
|
|
|
|
api_extractor(
|
|
name = "extract_api",
|
|
args = [
|
|
"run",
|
|
"-c",
|
|
"$(location api-extractor.json)",
|
|
],
|
|
data = [
|
|
"api-extractor.json",
|
|
"tsconfig.json",
|
|
":runtime_dts",
|
|
"//:package.json",
|
|
"//ts:tsconfig.json",
|
|
"//ts/components",
|
|
"//ts/editor",
|
|
],
|
|
)
|
|
|
|
# Tests
|
|
################
|
|
|
|
prettier_test()
|
|
|
|
eslint_test()
|