mirror of
https://github.com/casey/just.git
synced 2024-11-26 23:27:26 +03:00
Document the default recipe (#1006)
This commit is contained in:
parent
16aa0ed34e
commit
fda48430ca
31
README.adoc
31
README.adoc
@ -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`:
|
||||
|
Loading…
Reference in New Issue
Block a user