Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See react/README
- Loading branch information
Showing
26 changed files
with
16,396 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
EXTEND_ESLINT=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
extends: ["react-app"], | ||
rules: { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" } | ||
] | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.vscode | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
pybackend_run: | ||
pip install bottle | ||
python pybackend.py | ||
SHELL := bash | ||
.SHELLFLAGS := -eu -o pipefail -c | ||
.DELETE_ON_ERROR: | ||
MAKEFLAGS += --warn-undefined-variables | ||
MAKEFLAGS += --no-builtin-rules | ||
.SUFFIXES: | ||
|
||
$(shell mkdir -p .build) | ||
|
||
.PHONY: all | ||
all: run | ||
|
||
.PHONY: run | ||
run: build-tslib | ||
tmux new -d -s anki-react "make run-pybackend" | ||
tmux split-window "make run-react" | ||
tmux attach | ||
|
||
.PHONY: run-pybackend | ||
run-pybackend: | ||
../pyenv/bin/pip install bottle | ||
../pyenv/bin/python pybackend.py | ||
|
||
.PHONY: build-tslib | ||
build-tslib: | ||
(cd ../tslib && make build) | ||
|
||
.PHONY: run-react | ||
run-react: .build/deps | ||
npm run start | ||
|
||
.build/deps: package.json | ||
npm i | ||
@touch $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This is a proof of concept for an alternate, web-based UI. It is in the very | ||
early stages, and does not do anything useful at the moment. | ||
|
||
The code uses the helpers in ../tslib to communicate with the Python | ||
backend defined in ../pylib/anki/pybackend.py, leveraging the same | ||
protobuf definitions used for the Rust/Python bridge. | ||
|
||
To try it: | ||
|
||
- ensure 'tmux' is installed | ||
- run 'make run' in the top level folder and close Anki | ||
- copy a test .anki2 file to ~/test.anki2 | ||
- run 'make run' in this folder |
Oops, something went wrong.