You can format files with zprint using babashka. This has several benefits:
There are several approaches to using babashka to run zprint:
bb.ednbbin to install install the latest zprintThe differences are minor but worth knowing:
When installing zprint as a task in bb.edn, you must specify the
version of zprint you want. Upgrading is easy, just specify a newer
version.
The bbin approach will install the latest version of zprint. Latest
as of when you executed bbin. The bbin approach adds a small increment
to the startup time, on the order of perhaps 0.1s. Not a lot, and you
might not notice it.
zprint requires at least babashka 1.3.183 to execute properly.
See how to get babashka.
Add the following map to your bb.edn file. You will want to adjust the
:mvn/version to be whatever version of zprint is current. This is
the current version:
{:tasks {zprint {:extra-deps {zprint/zprint {:mvn/version "1.3.0"}},
:requires ([zprint.main]),
:task (apply zprint.main/-main *command-line-args*)}}}
You can now invoke the zprint task using babashka like this (assuming bb invokes babashka):
bb zprint --help
All of the normal switches for the zprint uberjar or zprint pre-compiled
binaries work except for --url, -u, and --url-only. Which you probably
weren't interested in anyway.
zprint requires at least babashka 1.3.183 to execute properly.
See how to get babashka.
You must have installed bbin.
You just execute:
bbin install io.github.kkinnear/zprint
The default name for what is installed is zprint. Using a different
name is easy:
bbin install io.github.kkinnear/zprint --as zprint-myname
where zprint-myname is whatever name you want.
The normal switches are supported:
zprint --help
Can you improve this documentation? These fine people already did:
Kim Kinnear & lreadEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |