-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile.toml
39 lines (28 loc) · 974 Bytes
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
[config]
skip_core_tasks = true
default_to_workspace = false
[tasks.precommit-cargo]
script = "cargo fmt && cargo clippy"
[tasks.precommit-js]
script = "cd js && depot fmt"
[tasks.precommit.run_task]
name = ["precommit-js", "precommit-cargo"]
[tasks.watch]
script = "cargo watch -x 'install --path crates/mdbook-quiz --debug --offline --features rust-editor --features source-map' -w crates -w js/packages/quiz-embed/dist --ignore-nothing"
[tasks.clean]
script = """
cargo clean
cd js && depot clean && cd ..
rm -rf js/packages/quiz/src/bindings crates/mdbook-quiz-schema/bindings
"""
[tasks.init-bindings]
script = """
cargo test -p mdbook-quiz-schema --locked export_bindings --features ts
mkdir -p js/packages/quiz/src/bindings
cp crates/mdbook-quiz-schema/bindings/* js/packages/quiz/src/bindings
"""
[tasks.install]
dependencies = ["init-bindings"]
script = """
cargo install --path crates/mdbook-quiz --features rust-editor --features aquascope --locked
"""