I learned how to write a program and then “run it” in Leiningen repl lein repl and how to run tests using lein test but I’m struggling to get a good up-to-date resource to learn how to make a binary out of it.
Could you please point me to a book / web / example that would teach me how to do that using deps.edn?
I vaguely understand that there are differences for “dev” and “release” but I know that I actually don’t know what I want and that’s probably the main reason why most of content I found around deps.edn is hard to understand since deps.edn is more DIY than Leiningen. But that’s also the reason why I want to try it out ;-).
I’ve just been updating Practicalli Clojure free online book with a guide to Clojure CLI, including tools.build example for creating jars and uberjars. The book also includes videos to show the Clojure workflow with Clojure CLI.
The book includes a user configuration for Clojure CLI that provides a wide range of tools that extend the built-in features (test runners, hotloading libraries, searching for libraries and versions, format tools, rich repl ui, etc.)
Note: the tooling to create the book has had a major upgrade, so there may still be a few issues (although they should be fixed in the next few days)
It took me a while to adopt tools.build as I didn’t really want to script the build process for each project. All my projects just create a jar or uberjar
However the build.clj script doesn’t need to change so can start as boilerplate code, the same in each project.
If there is need to change the build process, then tools.build makes this easy to do. I would like to see some examples of what people have found useful.
I’m assuming some ClojureScript projects may benefit from tools.build, e.g like copying web assets
Also if there is more complexity in the build, over creating a jar or uberjar, then tools.build could be very useful.