Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clojure CLI verses Leiningen #470

Open
practicalli-johnny opened this issue Aug 8, 2024 · 0 comments
Open

Clojure CLI verses Leiningen #470

practicalli-johnny opened this issue Aug 8, 2024 · 0 comments
Assignees

Comments

@practicalli-johnny
Copy link
Contributor

Here are some of my own personal thoughts for using Clojure CLI

  • Its from the Clojure team so should be well maintained (Leiningen does have a pretty good record of this though too)
  • Has a wider range of community tools that can be used on top, e.g. See Practicalli Clojure CLI Config. (Leiningen plugins used to cause me a lot of issues - but that may have been my lack of understanding)
  • Feels simpler and much more flexible in terms of configuration, just add a new feature by adding an alias to :aliases
  • I like the data-centric config syntax of deps.edn (rather than the code approach of Leiningen project.clj)
  • I rewrote the Practicalli Clojure book around Clojure CLI, so I must enjoy using it 🙂

Things that usually cause the most learning curve

  • The command line
    • an appreciation of the main flags (-M -X -T -P) and when to use them
    • using key value pairs for args with the -X and -T flags
  • Designing aliases and when to use :main-opts or :exec-fn & :exec-ops (usually determined by the library and type of arguments to provide)

I use a Makefile to wrap commands to make them simple and consistent across projects. Babashka tasks or any other task runner could be used to simplify the command line.
Or use the shell history (I use zsh with fish extension and it makes most commands a few key clicks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant