Anki/ts/runtime/BUILD.bazel
Damien Elmes 366a697b3a Add a runtime proof of concept
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
2022-04-03 23:37:35 +10:00

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()