Commit graph

23 commits

Author SHA1 Message Date
Henrik Giesel
c894d32c14 Fix remaining errors in editor/*.svelte files 2021-05-07 15:10:28 +02:00
Henrik Giesel
8238ec5727 Rename editor-toolbar to components 2021-05-07 02:03:55 +02:00
Henrik Giesel
31eaeef09b Rename anki/ to lib/ for export
import _ from "anki/x";

will become

import _ from "lib/x";

to fit the directory name.
2021-04-23 10:02:28 +10:00
Henrik Giesel
ae801729ec Prefer exec over matchAll 2021-04-21 14:18:44 +02:00
Henrik Giesel
f11db5579e Move dynamic component initialization logic from editor to editor-toolbar 2021-04-20 14:23:28 +02:00
Henrik Giesel
93136030e9 Include editor-toolbar as a library in editor 2021-04-20 13:44:44 +02:00
Damien Elmes
ad47b68255 add Jest for TS unit tests
@hgiesel the reason no files were being found is because Jest ignores
symlinks by default. The Bazel example includes a patch we can use
to work around it, and Jest plan to add symlink support in a future
update.

https://github.com/bazelbuild/rules_nodejs/blob/stable/examples/jest/patches/jest-haste-map%2B24.9.0.patch

https://github.com/facebook/jest/pull/9351
2021-03-28 19:41:20 +10:00
Henrik Giesel
1aefab95f8 Move html-filter into its own directory 2021-03-28 19:41:20 +10:00
Henrik Giesel
0368bac9be Move async and asyncReactive to sveltelib
- sveltelib is a lib for component-agnostic svelte utils
2021-03-22 03:06:53 +01:00
Henrik Giesel
92658495ad Improve implementation of asyncRefresh 2021-03-22 01:40:51 +01:00
Henrik Giesel
5ee3e0d0d7 Add PreferenceStore with gettable/settable preferences
* setting is not yet hooked up to rslib
2021-01-22 13:14:33 +01:00
Henrik Giesel
9803a4ab00 Switch to iterables for elem.style and elem.attributes 2021-01-19 02:48:41 +01:00
Damien Elmes
b43515ceff add .sql file formatter
Uses the logic from the sqltools VSCode add-on, with a workaround
for the use of 'type' in some table columns.

By detecting the presence of 'BUILD_WORKSPACE_DIRECTORY' we can tell
if the rule is running in test mode or was run directly, avoiding the
need for separate check and fix rules. It might be nice to extend this
to other formatting rules in the future as well.
2021-01-09 14:22:49 +10:00
Henrik Giesel
3f5d645987 Add es2019.array to TypeScript libs, so we can use .flatten and .flatMap 2021-01-08 12:23:21 +01:00
Damien Elmes
15c41b008c fix path to anki lib in ts/ when editing 2020-12-16 14:15:49 +10:00
Damien Elmes
ce3b08ac58 initial Bazel conversion
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:

- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
Damien Elmes
348da61744 include 1+ day learning cards in future due graph 2020-07-21 14:10:32 +10:00
Damien Elmes
87f22bd358 add a new ts/ folder with a new graph proof of concept 2020-06-29 15:48:00 +10:00
Damien Elmes
3ca39bfda3 move the separate components back into this monorepo
Earlier today I pushed a change that split this code up into multiple
repos, but that has proved to complicate things too much. So we're
back to a single repo, except the individual submodules are better
separated than they were before.

The README files need updating again; I will push them out soon.

Aside from splitting out the different modules, the sound code has
moved from from anki to aqt.
2020-01-02 19:43:19 +10:00
Damien Elmes
9f8070dbc8 fix broken js building
- deps need to be defined before used
- incremental builds were not working properly
2019-12-18 17:56:58 +10:00
Damien Elmes
45083f3caa compile typescript in one go
much faster, especially with --incremental
2019-12-18 14:33:57 +10:00
Damien Elmes
e7e4e6414d deckbrowser and overview 2019-12-18 13:21:58 +10:00
Damien Elmes
4bf9cc8b5e add typescript to build 2019-12-18 12:53:13 +10:00