-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added various new recipes and sub modules to separate common functionality and improve local iteration. - Added a doc module for generating and serving documentation such as the book and the rust library documentation - Added a test module for running various test harnesses and doc tests - Added a check module for various checks and lint configurations - Added ci recipe for replicating CI partially for local testing - Added run recipe - Added clean recipe to remove build artifacts
- Loading branch information
Showing
4 changed files
with
103 additions
and
13 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,29 @@ | ||
book-src := justfile_directory() / 'docs' / 'book' | ||
|
||
# run all (doesn't include typos) | ||
all: clippy format book | ||
|
||
# check the whole project for typos | ||
typos *args: | ||
typos {{ args }} | ||
|
||
# run various book checks and linters | ||
book: book-test book-linkcheck | ||
|
||
# check book code examples | ||
book-test: | ||
mdbook test {{ book-src }} | ||
|
||
# check book links (disabled) | ||
book-linkcheck: | ||
# TODO: this is currently disabled as the book is in progress and contains dead | ||
# links | ||
# mdbook-linkcheck --standalone {{ book-src }} | ||
|
||
# run clippy lints | ||
clippy *args='--all-targets --all-features': | ||
cargo clippy --workspace {{ args }} | ||
|
||
# check rust formatting | ||
format *args: | ||
cargo fmt --all --check {{ args }} |
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,25 @@ | ||
book-src := justfile_directory() / 'docs' / 'book' | ||
|
||
# build all documentation | ||
all: build | ||
|
||
# build all documentation | ||
build: book-build rust-build | ||
|
||
# build and open the book | ||
book *args: (book-serve '--open' args) | ||
|
||
# build the book | ||
book-build *args: | ||
mdbook build {{ book-src }} {{ args }} | ||
|
||
# serve the book | ||
book-serve *args='--open': | ||
mdbook serve {{ book-src }} {{ args }} | ||
|
||
# compile and open the rust documentation | ||
rust *args: (rust-build '--open' args) | ||
|
||
# compile the rust documentation | ||
rust-build *args: | ||
cargo doc --workspace {{ args }} |
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,22 @@ | ||
book-src := justfile_directory() / 'docs' / 'book' | ||
|
||
# run a full test harness (doc tests disabled) | ||
all: && book doc | ||
cargo nextest run --workspace | ||
|
||
# run the lib tests | ||
lib *args: | ||
cargo nextest run --package typst-test-lib {{ args }} | ||
|
||
# run the cli tests | ||
cli *args: | ||
cargo nextest run --package typst-test {{ args }} | ||
|
||
# run the doc tests | ||
doc *args: | ||
# TODO: this currently deadlocks my pc at 100% CPU | ||
# cargo test --workspace --doc {{ args }} | ||
|
||
# test the book | ||
book *args: | ||
mdbook test {{ book-src }} {{ args }} |