1
1
mirror of https://github.com/casey/just.git synced 2024-09-11 05:55:31 +03:00

Add list highlighting nice features to readme (#664)

This was suggested by @zaiste, to make it clearer how Just differs from
Make, and what features it has.
This commit is contained in:
Casey Rodarmor 2020-08-05 19:20:11 -07:00 committed by GitHub
parent 981465ad30
commit 5e2b51e83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 13 deletions

View File

@ -19,13 +19,13 @@ jobs:
os:
- macos-latest
- ubuntu-latest
- windows-latest
- windows-2016
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: windows-latest
- os: windows-2016
target: x86_64-pc-windows-msvc
runs-on: ${{matrix.os}}
@ -41,19 +41,19 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
key: 0-${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
key: 0-${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
key: 0-${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install Main Toolchain
uses: actions-rs/toolchain@v1
@ -80,7 +80,7 @@ jobs:
run: cargo clippy --all
- name: Lint
if: matrix.os != 'windows-latest'
if: matrix.os != 'windows-2016'
run: cargo run lint
- name: Install Rustfmt Toolchain
@ -95,7 +95,7 @@ jobs:
run: cargo +nightly fmt --all -- --check
- name: Completion Scripts
if: matrix.os != 'windows-latest'
if: matrix.os != 'windows-2016'
run: |
./bin/generate-completions
git diff --no-ext-diff --quiet --exit-code

View File

@ -12,7 +12,7 @@ image:https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg[say thanks,link=htt
(非官方中文文档,link:https://github.com/chinanf-boy/just-zh[这里],快看过来!)
Commands are stored in a file called `justfile` with syntax inspired by `make`:
Commands, called recipes, are stored in a file called `justfile` with syntax inspired by `make`:
```make
build:
@ -27,7 +27,7 @@ test TEST: build
./test --test {{TEST}}
```
You can then run them with `just COMMAND`:
You can then run them with `just RECIPE`:
```sh
$ just test-all
@ -36,9 +36,40 @@ cc *.c -o main
Yay, all your tests passed!
```
`just` produces detailed error messages and avoids `make`’s idiosyncrasies, so debugging a justfile is easier and less surprising than debugging a makefile.
Just has a ton of useful features, and many improvements over Make:
If you need help with `just` please feel free to open an issue or let me know on link:https://gitter.im/just-because/Lobby[gitter]. Feature requests and bug reports are always welcome!
- Just is a command runner, not a build system, so it avoids much of
link:https://github.com/casey/just#what-are-the-idiosyncrasies-of-make-that-just-avoids[Make's
complexity and idiosyncrasies]. No need for `.PHONY` recipes!
- Errors are specific and informative, and syntax errors are reported along with their source context.
- Recipes can accept
link:https://github.com/casey/just#recipe-parameters[command line arguments].
- Wherever possible, errors are resolved statically. Unknown recipes and
circular dependencies are reported before anything runs.
- Just link:https://github.com/casey/just#dotenv-integration[loads `.env`
files], making it easy to populate environment variables.
- Recipes can be
link:https://github.com/casey/just#listing-available-recipes[listed from the
command line].
- Command line completion scripts are
link:https://github.com/casey/just#shell-completion-scripts[available for
most popular shells].
- Recipes can be written in
link:https://github.com/casey/just#writing-recipes-in-other-languages[arbitrary
languages], like Python or NodeJS.
- `just` can be invoked from any subdirectory, not just the directory that contains the `Justfile`.
- And link:https://github.com/casey/just#manual[much more]!
If you need help with `just` please feel free to open an issue or ping me on link:https://discord.gg/ezYScXR[discord]. Feature requests and bug reports are always welcome!
[discrete]
== Manual

View File

@ -20,7 +20,7 @@ case $os in
cargo rustc --bin $bin --target $target --release
executable=target/$target/release/$bin
;;
windows-latest)
windows-2016)
cargo rustc --bin $bin --target $target --release -- -C target-feature="+crt-static"
executable=target/$target/release/$bin.exe
;;
@ -46,7 +46,7 @@ case $os in
tar czf $archive *
echo "::set-output name=archive::$archive"
;;
windows-latest)
windows-2016)
archive=$dist/$bin-$version-$target.zip
7z a $archive *
echo "::set-output name=archive::`pwd -W`/$bin-$version-$target.zip"