Commit Graph

26 Commits

Author SHA1 Message Date
Henrik Giesel
9b2378c3d2 Introduce editable module 2021-09-15 13:32:30 +02:00
Henrik Giesel
392bdf6184 Port most components from first tageditor PR 2021-09-09 15:37:33 +02:00
Henrik Giesel
eb4550d2d5 Catch hook errors in two ways:
- try/catch for catching synchronous errors
- Promise.allSettled will allow for rejected promises without fast-failing other promises
2021-07-19 01:23:41 +02:00
Henrik Giesel
cf38cb334e Fix remaining errors in editor/*.svelte files 2021-05-07 15:10:28 +02:00
Henrik Giesel
47b1cfe804 Rename editor-toolbar to components 2021-05-07 02:03:55 +02:00
Henrik Giesel
1d72599a37 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
64db04f1bb Prefer exec over matchAll 2021-04-21 14:18:44 +02:00
Henrik Giesel
37ea39f779 Move dynamic component initialization logic from editor to editor-toolbar 2021-04-20 14:23:28 +02:00
Henrik Giesel
b1de095162 Include editor-toolbar as a library in editor 2021-04-20 13:44:44 +02:00
Damien Elmes
c891f45ed9 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
519aea2ea8 Move html-filter into its own directory 2021-03-28 19:41:20 +10:00
Henrik Giesel
10b8a1c3cb 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
75a8b7d318 Improve implementation of asyncRefresh 2021-03-22 01:40:51 +01:00
Henrik Giesel
5fc8b1965a Add PreferenceStore with gettable/settable preferences
* setting is not yet hooked up to rslib
2021-01-22 13:14:33 +01:00
Henrik Giesel
47d26126e7 Switch to iterables for elem.style and elem.attributes 2021-01-19 02:48:41 +01:00
Damien Elmes
3dad3c90d0 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
38a5f64150 Add es2019.array to TypeScript libs, so we can use .flatten and .flatMap 2021-01-08 12:23:21 +01:00
Damien Elmes
4c06d89644 fix path to anki lib in ts/ when editing 2020-12-16 14:15:49 +10:00
Damien Elmes
aea0a6fcc6 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
44668c5b1d include 1+ day learning cards in future due graph 2020-07-21 14:10:32 +10:00
Damien Elmes
6fd444b958 add a new ts/ folder with a new graph proof of concept 2020-06-29 15:48:00 +10:00
Damien Elmes
b23b6fbe35 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
c15f71071e 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
f3bfed82ef compile typescript in one go
much faster, especially with --incremental
2019-12-18 14:33:57 +10:00
Damien Elmes
de29b02089 deckbrowser and overview 2019-12-18 13:21:58 +10:00
Damien Elmes
9b04a92df2 add typescript to build 2019-12-18 12:53:13 +10:00