Document the default recipe (#1006)

This commit is contained in:
Casey Rodarmor 2021-10-26 19:11:12 -07:00 committed by GitHub
parent 16aa0ed34e
commit fda48430ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -404,6 +404,37 @@ This https://toniogela.dev/just/[blog post] discusses using `just` to improve ma
== Features
=== The Default Recipe
When `just` is invoked without a recipe, it runs the first recipe in the justfile. This recipe might be the most frequently run command in the project, like running the tests:
```make
test:
cargo test
```
You can also use dependencies to run multiple recipes by default:
```make
default: lint build test
build:
echo Building…
test:
echo Testing…
lint:
echo Linting…
```
If no recipe makes sense as the default recipe, you can add a recipe to the beginning of your justfile that lists the available recipes:
```
default:
just --list
```
=== Listing Available Recipes
Recipes can be listed in alphabetical order with `just --list`: