This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-07
Channels
- # announcements (2)
- # babashka (24)
- # beginners (15)
- # calva (27)
- # clara (3)
- # clj-kondo (6)
- # cljs-dev (2)
- # clojure (83)
- # clojure-dev (35)
- # clojure-europe (82)
- # clojure-germany (2)
- # clojure-greece (1)
- # clojure-nl (5)
- # clojure-spec (52)
- # clojure-uk (14)
- # clojurescript (43)
- # conjure (16)
- # cursive (29)
- # data-science (1)
- # datalog (5)
- # datomic (1)
- # deps-new (8)
- # depstar (4)
- # emacs (6)
- # events (1)
- # fulcro (24)
- # jobs (4)
- # malli (12)
- # off-topic (46)
- # rewrite-clj (14)
- # shadow-cljs (53)
- # spacemacs (8)
- # specter (2)
- # sql (21)
- # tools-deps (62)
- # vrac (1)
- # xtdb (2)
is clj
a kind of leiningen
replacement ?
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).
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.
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).
See the list of available tools here https://github.com/clojure/tools.deps.alpha/wiki/Tools
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.
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).
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
Does that help @benoit.caccinolo?
Hi @U04V70XH6 thanks for the detailled reply it's more clear for me yep
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.
Hi guys, is there any tool like prettier but for clojure/clojurescript? 🙂
clj-kondo, eastwood spring to mind
This thread covers probably most of the candidates: https://clojureverse.org/t/clj-commons-building-a-formatter-like-gofmt-for-clojure/3240
thanks for the link 🙂