"Just" vs. Makefiles
After spending another 10 minutes trying to figure out more Makefile idiosyncrasies just to try and automate (and document) both oft and seldom issued commands, I recently found and decided to give the Just command-line runner a try.
The Just package took less than 10 minutes to understand what was necessary to change my complex Makefile to a far-simpler justfile
.
TL;DR; -> Why has it taken me so long to find this! If you don't need to worry about dependencies, unreservedly recommended.
Sample justfile
Here is the automation file that I used to build a previous implementation of my site (specifically, with Hugo):
$ just
Available recipes:
build # Build local content to public directory.
default # This list of available targets
deploy # Build local content *and* deploy to public github repo.
push # Commit current version of local public directory and push to github.
server # Run a local server (including drafts).
$ just build
...
...no more PHONY
's!
Now, obviously, since you're able to see the footer, you can tell I don't use Hugo anymore...thus, the need to do all the rigamorale above has gone away but justfiles
continue to be a core component of every one of my projects.
To see the current justfile
used for this site, follow the github link in the upper-right corner of this page and look for justfile
in the root directory.