Skip to content

Commit 6f57846

Browse files
committed
Migrate from cargo-make to Just
1 parent 22811a0 commit 6f57846

5 files changed

Lines changed: 29 additions & 47 deletions

File tree

.github/workflows/setup/action.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ runs:
1515
target: ${{ inputs.target }}
1616
override: true
1717
- uses: Swatinem/rust-cache@v1
18-
- name: Install cargo-make
19-
uses: baptiste0928/cargo-install@v2
20-
with:
21-
crate: cargo-make
18+
- uses: extractions/setup-just@v3
2219
- name: Install Depot
2320
uses: cognitive-engineering-lab/depot/actions/install@main
2421
- name: Install mdbook

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Thanks for your interest in contributing to mdbook-quiz! To get started, follow the "From Source" installation instructions in the README. Then from the root of the repository, run:
44

55
```
6-
cargo make watch
6+
just watch
77
```
88

99
This will build the Rust mdBook preprocessor, and rebuild it when Rust source files are changed. Then in another terminal, run:

Justfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
install: init-bindings
2+
cargo install --path crates/mdbook-quiz --features rust-editor --features aquascope --locked
3+
4+
watch:
5+
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
6+
7+
clean:
8+
cargo clean
9+
cd js && depot clean && cd ..
10+
rm -rf js/packages/quiz/src/bindings crates/mdbook-quiz-schema/bindings
11+
12+
init-bindings:
13+
cargo test -p mdbook-quiz-schema --locked export_bindings --features ts
14+
mkdir -p js/packages/quiz/src/bindings
15+
cp crates/mdbook-quiz-schema/bindings/* js/packages/quiz/src/bindings
16+
17+
precommit-cargo:
18+
cargo fmt && cargo clippy
19+
20+
precommit-js:
21+
cd js && depot fmt
22+
23+
precommit: precommit-js precommit-cargo
24+
25+

Makefile.toml

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ And you can check your version by running `mdbook-quiz -V`. This repository uses
4141

4242
### From source
4343

44-
You need Cargo, [cargo-make](https://github.com/sagiegurari/cargo-make), and [Depot](https://github.com/cognitive-engineering-lab/depot) installed. Then run:
44+
You need Cargo, [just](https://just.systems/), and [Depot](https://github.com/cognitive-engineering-lab/depot) installed. Then run:
4545

4646
```
4747
git clone https://github.com/cognitive-engineering-lab/mdbook-quiz
4848
cd mdbook-quiz
49-
cargo make init-bindings
50-
cargo install --path crates/mdbook-quiz
49+
just install
5150
```
5251

5352
## Usage

0 commit comments

Comments
 (0)