From ef39637c002eaa11147546d91978d6c18ee427d4 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 11 Nov 2016 13:04:47 -0800 Subject: [PATCH] Add examples of comments to readme (#40) Thanks @vitiral for suggesting this. --- README.md | 9 ++++++--- justfile | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f5ce32..0384e08 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,16 @@ just Commands are stored in a file called `justfile` or `Justfile` with syntax inspired by `make`: ```make +build: + cc *.c -o main + +# test everything test-all: build ./test --all +# run a specific test test TEST: build ./test --test {{TEST}} - -build: - cc *.c -o main ``` `just` produces detailed error messages and avoids `make`'s idiosyncrasies, so debugging a justfile is easier and less surprising than debugging a makefile. @@ -47,6 +49,7 @@ Recipes look like this: recipe-name: echo 'This is a recipe!' +# this is a comment another-recipe: @echo 'Another recipe.' ``` diff --git a/justfile b/justfile index 49874fe..f9a6122 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,7 @@ test: build cargo test --lib +# only run tests matching PATTERN filter PATTERN: cargo test --lib {{PATTERN}}