Fork me on GitHub
#beginners
<
2020-09-07
>
benoit.caccinolo06:09:30

is clj a kind of leiningen replacement ?

seancorfield06:09:37

Yes and no. clj (and clojure) is the official CLI from the Nubank/Cognitect/Clojure-core team. It lets you run Clojure programs (and REPLs).

seancorfield07:09:15

Leiningen also lets you run Clojure programs and REPLs but also includes stuff to build JAR and uberjar files and run tests and so on.

seancorfield07:09:53

The Clojure CLI supports all of that (and more) through additional simple tools/libraries that you add as dependencies (similar to how you would add plugins to Leiningen).

seancorfield07:09:11

At work, we started with Leiningen back in 2011 because that was the only option. We switched completely to Boot in 2015 and completely to the new CLI/`deps.edn` tooling in 2018 and we've been very happy with that choice.

seancorfield07:09:00

I think the Clojure CLI is much, much better for beginners to get up and running with. It's much simpler than Leiningen (even if it isn't perhaps as easy).

seancorfield07:09:07

As a taste of what you can do with the CLI/`deps.edn`, see my https://github.com/seancorfield/dot-clojure or John Stevenson's https://github.com/practicalli/clojure-deps-edn

seancorfield07:09:22

Does that help @benoit.caccinolo?

benoit.caccinolo08:09:33

Hi @ thanks for the detailled reply it's more clear for me yep

seancorfield07:09:26

From a getting started point of view, lein new app foo.bar will produce a simple application that you can lein run and lein test etc (and lein uberjar too). With the Clojure CLI, you need to use https://github.com/seancorfield/clj-new (which is also made available as part of https://github.com/seancorfield/dot-clojure ), but then you can do clojure -A:new app foo.bar to produce a simple application that you can clojure -m foo.bar to run, clojure -A:test to run tests, and clojure -A:uberjar to build an uber-JAR file. So it requires a little more setup than Leiningen but can do everything the same otherwise.

starships14:09:59

Hi guys, is there any tool like prettier but for clojure/clojurescript? 🙂

lennart.buit15:09:13

clj-kondo, eastwood spring to mind

starships12:09:29

thanks for the link 🙂