From aa7043fd1c5390929786ffac62ff9cb3cd5750ba Mon Sep 17 00:00:00 2001 From: James Pace Date: Wed, 10 Jan 2024 22:32:00 -0500 Subject: [PATCH] Post bard review. --- blog/quick_just_review.qmd | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/blog/quick_just_review.qmd b/blog/quick_just_review.qmd index 0c483f1..1c7b422 100644 --- a/blog/quick_just_review.qmd +++ b/blog/quick_just_review.qmd @@ -2,15 +2,14 @@ title: "Quick Review of Just" author: "James Pace" date: "2024/01/10" -draft: true --- -[Just](https://just.systems/man/en/) is a command runner that operates kind of like make, -if make was a command runner, not a build tool. +[Just](https://just.systems/man/en/) is a command runner that operates kind of like make. -When you call `just `, just looks for a `Justfile` in a parent directory, and does -whatever is under the `` entry in the file, where "things under" includes running a set -of bash commands or running a script that can be written inline. +Just lets you define tasks in a simple, human-readable file called a Justfile. +To run a task, simply call `just `. Just will automatically find the +Justfile in the nearest parent directory and execute the commands defined for that +task. For example, given the `Justfile`: @@ -25,18 +24,15 @@ test: the command `just test` will call `cargo test --features log` in the current terminal window. Compared to `make`, `just`: -1. Doesn't require `.PHONY` targets for targets that don't produce any files. -2. Can be called below the directory the `Justfile` is in, and still find the `Justfile` +1. Eliminates the need for manual .PHONY target creation, saving you time and reducing + clutter in Justfiles compared to Makefiles. +2. Can be called below the directory the `Justfile` is in and still find the `Justfile` in the parent directory. -In my recent development where I was doing development calling wasm written in rust in a +In my recent development where I was calling wasm written in rust in a web app, I found `just` particularly useful. Building the app took multiple commands, one command for compiling the rust part and a second command to bundle the JavaScript. -Combining things under a single `just` target was nice. -I considered just using `make` for this application, but: - -1. Having to add .PHONY targets adds line noise that adds up. -2. I found being able to call `just` from any subdirectory really - convenient. \ No newline at end of file +Combining things under a single `just` target was nice and lead to quicker +iterations. \ No newline at end of file