I’m using clojure cli more often, and I’m curious about your setup and workflow. Mine is this:
-
In
~/.clojure/deps.edn
I have anuser
alias:{:aliases {:user {:extra-deps {vvvvalvalval/scope-capture {:mvn/version "0.3.2"} com.gfredericks/dot-slash-2 {:mvn/version "0.1.5"} com.gfredericks/repl-utils {:mvn/version "0.2.17"}} :extra-paths ["/path/to/user-dir"]}}}
In the
:extra-paths
I only have auser.clj
file, where I created some helper functions I want to use during development on all my projects. It also looks for otheruser.clj
files in the classpath and load them. My user.clj -
If I want to have some specific helpers for only one project, I create an
user.clj
local to the project. Here I also have the opportunity to override some parts of my globaluser.clj
, if I wanted. From the command line, I start the project withclj -A:user:dev
, whereuser
is the alias from my globaldeps.edn
anddev
is an alias from my current project.
I have more aliases, like nrepl
, which is adding other user.clj
file to the classpath to start a nrepl server. In that case I’ll start clj with clj -A:user:nrepl:dev
. Relevant parts of my deps.edn.
What do you think about this setup? How it’s yours?
BTW, there was a similar topic: Deps.edn workflows, but it’s closed and I cannot post there.