Fork me on GitHub
#babashka
<
2022-06-21
>
quoll13:06:44

I seem to remember someone writing something for Babashka that would set up a new project directory with a single command. Did I imagine this, or does such a thing exist, please? Note: this is easy to write, but I’m looking for something that I can point a beginner at and say, “Run this command”.

borkdude13:06:15

@U051N6TTC This is usually what clj-new / deps-new are used for. But I think you might mean #babashka-neil which doesn't set up a project, but adds things to projects, like build.clj file

quoll13:06:33

Ah, thank you 🙂

borkdude13:06:48

neil add test
neil add build
neil dep add cheshire/cheshire
etc

quoll13:06:48

I think that’s what I was thinking of

quoll13:06:19

But I didn’t know about deps-new! Thanks for that one

dorab16:06:41

+1 for deps-new. Much easier to write templates for. The (obvious) downside is the incompatibility with lein templates.

quoll17:06:45

I used to tell people to download Leiningen, and then use lein new app. But the world has moved on, and deps.edn is how these things ought to be done now. But telling a person who is new to Clojure to create a deps.edn file, create src and test directories and reference them in the deps file… this is so 2000, and not the hallmark of a modern language.

quoll17:06:20

Personally, I still like lein, but I’ve been using deps.edn for new things

borkdude17:06:26

> deps.edn is how these things ought to be done now That's an opinion though. Lein still works fine and is way more accessible for new people. I don't think it's necessarily wrong to still recommend it

borkdude17:06:42

But I want to add something like neil init or neil new to neil as well

quoll17:06:09

I do feel like there is a push to build around deps.edn now. So I’ve been trying to put the effort in to make sure I’m learning it. But when it comes to large projects, I still like the comfort and ease of Leiningen. (Asami will never not be a Lein project)

borkdude17:06:18

In some projects I use both, especially when it was easier to lein deploy clojars, but with neil add build it's a couple of minutes before I can deploy now too. It's just not an out of the box experience with vanilla deps.edn

quoll18:06:19

it’s the deploy piece that keeps bringing me back to leiningen