Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

book:just configs #661

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions book/justfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
[private]
default:
@just --list
# install book depends
init:
@mdbook --version || cargo install mdbook --version 0.4.40
@mdbook-linkcheck --version || cargo install mdbook-linkcheck --version 0.7.7
@mdbook-admonish --version || cargo install mdbook-admonish --version 1.15.0
@mdbook-snippets --version || cargo install --path ./snippets-processor
@mdbook --version || \
cargo binstall -y --force mdbook --version 0.4.40 || \
cargo install --force mdbook --version 0.4.40
@mdbook-linkcheck --version || \
cargo binstall -y --force mdbook-linkcheck --version 0.7.7 || \
cargo install --force mdbook-linkcheck --version 0.7.7
@mdbook-admonish --version || \
cargo binstall -y --force mdbook-admonish --version 1.15.0 || \
cargo install --force mdbook-admonish --version 1.15.0
@mdbook-snippets --version || \
cargo install --force --path ./snippets-processor

# build mdbook
build: init
mdbook build

# serve mdbook (localhost:3000)
serve: init
mdbook serve

# cd snippets && just test
test:
cd snippets && just test

# clean mdbook depends
clean:
cargo uninstall mdbook
cargo uninstall mdbook-linkcheck
cargo uninstall mdbook-admonish
cargo uninstall mdbook-snippets
Loading