From fda48430caf31df0aafb06b138cfdf2dbe1dddb6 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 26 Oct 2021 19:11:12 -0700 Subject: [PATCH] Document the default recipe (#1006) --- README.adoc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.adoc b/README.adoc index 7c18e6f..1afea7e 100644 --- a/README.adoc +++ b/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`: