Anki is a smart spaced repetition flashcard program
Find a file
Damien Elmes a3d9f90af5 update to latest rules_nodejs & switch to ts_project
ts_library() is deprecated and will presumably be dropped from a
future rules_nodejs, and it wasn't working with the jest tests
after updating, so we switch over to ts_project().

There are some downsides:

- It's a bit slower, as the worker mode doesn't appear to function
at the moment.
- Getting it working with a mix of source files and generated files
was quite tricky, especially as things behave differently on Windows,
and differently when editing with VS Code. Solved with a small patch
to the rules, and a wrapper script that copies everything into the
bin folder first. To keep VS Code working correctly as well, the built
files are symlinked into the source folder.
- TS libraries are not implicitly linked to node_modules, so they
can't be imported with an absolute name like "lib/proto" - we need
to use relative paths like "../lib/proto" instead. Adjusting "paths"
in tsconfig.json makes it work for TS compilation, but then it fails
at the esbuild stage. We could resolve it by wrapping the TS
libraries in a subsequent js_library() call, but that has the downside
of losing the transient dependencies, meaning they need to be listed
again.  Alternatively we might be able to solve it in the future by
adjusting esbuild, but for now the paths have been made relative to
keep things simple.

Upsides:

- Along with updates to the Svelte tooling, Svelte typing has improved.
All exports made in a Svelte file are now visible to other files that
import them, and we no longer rebuild the Svelte files when TS files
are updated, as the Svelte files do no type checking themselves, and
are just a simple transpilation. Svelte-check now works on Windows again,
and there should be no errors when editing in VS Code after you've
built the project. The only downside seems to be that cmd+clicking
on a Svelte imports jumps to the .d.ts file instead of the original now;
presumably they'll fix that in a future plugin update.
- Each subfolder now has its own tsconfig.json, and tsc can be called
directly for testing purposes (but beware it will place build products
in the source tree): ts/node_modules/.bin/tsc -b ts
- We can drop the custom esbuild_toolchain, as it's included in the
latest rules_nodejs.

Other changes:

- "image_module_support" is moved into lib/, and imported with
<reference types=...>
- Images are now imported directly from their npm package; the
extra copy step has been removed.

Windows users may need to use "bazel clean" before building this,
due to old files lying around in the build folder.
2021-10-01 12:52:53 +10:00
.buildkite use separate integration test for links 2021-07-24 10:12:25 +10:00
.github/ISSUE_TEMPLATE add issue template config.yml 2021-02-19 14:11:21 +10:00
cargo attempt to fix Linux build 2021-07-23 21:00:51 +10:00
docs tweak linux.md and add forum link 2021-09-02 20:52:55 +10:00
ftl Apply suggestions from code review 2021-09-22 16:59:05 +02:00
pip update to latest mypy 2021-06-16 16:04:59 +10:00
platforms add linux_arm64 platform 2020-12-29 18:40:39 +10:00
proto bikeshedding: amount -> match_limit 2021-09-12 11:57:49 +10:00
pylib fix uncaught error when int over 64 bits passed into db_command() 2021-09-30 16:46:33 +10:00
qt update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
rslib Merge pull request #1264 from hgiesel/tageditor2 2021-09-15 20:21:16 +10:00
scripts update svelte-check 2021-09-29 12:27:27 +10:00
ts update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
.bazelignore initial Bazel conversion 2020-11-01 14:26:58 +10:00
.bazelrc use separate integration test for links 2021-07-24 10:12:25 +10:00
.bazelversion update pinned Bazel version to 4.0 release 2021-01-21 19:58:41 +10:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore add script to run Rust Analyzer using Bazel's build products 2021-05-04 20:06:42 +10:00
bazel.bat initial Bazel conversion 2020-11-01 14:26:58 +10:00
BUILD.bazel update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
Cargo.lock Add links.rs for checking and building links 2021-07-22 10:03:03 +02:00
Cargo.toml add linkcheck to Bazel 2021-07-23 20:22:32 +10:00
CONTRIBUTORS Update CONTRIBUTORS 2021-09-24 13:46:01 +00:00
defs.bzl update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
late_deps.bzl update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
LICENSE move aqt_data into source folder; implement wheel building 2020-11-04 12:14:03 +10:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
python.bzl use PYTHON_SYS_EXECUTABLE for setting path to Python 2020-12-23 21:53:13 +10:00
README.md fix build badge 2021-06-24 09:21:56 +10:00
repos.bzl update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
run proper fix for __pycache__ folders preventing remove on ./run 2021-01-12 18:47:08 +10:00
run.bat enable Python warnings when running 2020-12-16 14:59:04 +10:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
WORKSPACE rename workspace 2021-07-10 23:58:53 +10:00

Anki

Build status

This repo contains the source code for the computer version of Anki.

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/

For more information on building, please see Development.