mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 03:13:25 +03:00
;doc: dev: edits
This commit is contained in:
parent
5766d8fe7e
commit
7ba0c3999e
@ -1,10 +1,9 @@
|
|||||||
# Just, make, and Shake
|
# Just, make, and Shake
|
||||||
|
|
||||||
After many years of using on GNU Make for automating project tasks,
|
After many years of relying on `make` for automating project tasks,
|
||||||
we now primarily use `just` <https://github.com/casey/just> instead.
|
we now primarily use [`just`](https://github.com/casey/just) instead.
|
||||||
`just` is better enough, and clean consolidated efficient project automation is so valuable,
|
`just` is better enough, and clean consolidated efficient project automation is so valuable,
|
||||||
that it is worthwhile, even though, for now, it is usually not installed by default and it lacks Make's file dependency tracking.
|
that it is worthwhile, even though, for now, it is usually not installed by default and it lacks Make's file dependency tracking.
|
||||||
When dependency tracking, or more powerful code, is really needed, we typically use [[SHAKE|Shake.hs]] instead of make or just.
|
|
||||||
|
|
||||||
`Justfile` in the main repo's top directory is where we keep the recipes (scripts);
|
`Justfile` in the main repo's top directory is where we keep the recipes (scripts);
|
||||||
this is the starting point for automating hledger project tasks.
|
this is the starting point for automating hledger project tasks.
|
||||||
@ -17,21 +16,25 @@ $ j # list all scripts
|
|||||||
$ j h test # list scripts mentioning "test"
|
$ j h test # list scripts mentioning "test"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Make
|
|
||||||
|
|
||||||
[GNU Make](https://www.gnu.org/software/make) makefiles are still used in a number of subdirectories - site, finance etc.
|
|
||||||
|
|
||||||
## Shake
|
## Shake
|
||||||
|
|
||||||
`Shake.hs` in the main repo's top directory complements the Justfile;
|
`Shake.hs` in the main repo's top directory complements the Justfile.
|
||||||
it is used for tasks requiring file dependencies or more complex code, such as building documentation and the web site.
|
Tasks requiring file dependencies and/or more complex code, such as building documentation and the web site,
|
||||||
|
are usually scripted here, often with a corresponding alias in `Justfile`.
|
||||||
Eg:
|
Eg:
|
||||||
|
|
||||||
```cli
|
```cli
|
||||||
$ ./Shake.hs # compile it for speed and git branch independence. Or: just Shake
|
$ ./Shake.hs # compile it for speed and git branch independence. Or: just Shake
|
||||||
$ ./Shake # list scripts
|
$ ./Shake # list scripts
|
||||||
|
$ j site # runs the `site` script in `Justfile` which calls the `site` script in `./Shake.hs` to do most of the work.
|
||||||
|
$ j -n site # just --dry-run, show the commands that `just site` will run
|
||||||
```
|
```
|
||||||
|
|
||||||
## tools
|
## tools
|
||||||
|
|
||||||
Additional helper scripts and tools can be found in the `tools/` subdirectory.
|
Additional helper scripts and tools are kept in the `tools/` subdirectory.
|
||||||
|
|
||||||
|
## Make
|
||||||
|
|
||||||
|
[GNU Make](https://www.gnu.org/software/make) makefiles are still used in a number of subdirectories - site, finance etc.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user