Fork me on GitHub
#deps-new
<
2023-02-17
>
teodorlu14:02:35

Hi 🙂 As far as I can tell, the valid built-in templates are the subfolders in https://github.com/seancorfield/deps-new/tree/6f14ddb6f98c55d6bd8d6a50bcdf6bd1abdf57bf/resources/org/corfield/new/:

$ ls resources/org/corfield/new/
app  lib  pom  scratch  template
Is there an endorsed way to get a list of those? --- My motivation for asking is that neil recently https://clojurians.slack.com/archives/C015AL9QYH1/p1676627903446089. In the docs, "built-in templates" are mentioned, but finding out which built in templates are available is left as an exercise to the user. I think it would be nice to provide that information in the subcommand helptext or in some other way.
$ neil new -h
[...]
Both built-in and external templates are supported. Built-in templates use
unqualified names (e.g. scratch) whereas external templates use fully-qualified
names (e.g. io.github.kit/kit-clj).
[...]

seancorfield17:02:02

Perhaps neil's docs should point to https://github.com/seancorfield/deps-new/blob/develop/README.md if they don't already, which lists the five built-in templates?

👍 2
teodorlu17:02:43

That would be an improvement! Though the user would still have to "mentally" translate between deps-new style CLI invocations

$ clojure -Tnew app :name myusername/mynewapp
and neil-style CLI invocations
$ neil new app :name myusername/mynewapp

seancorfield17:02:41

For deps-new itself, you can do clojure -A:deps -Tnew help/doc to get help for all the built-in functions. I don't know how neil could surface that.

👀 2
seancorfield17:02:29

(the deps-new README has that command in it, BTW, at the end of the Motivation section)

💯 2
teodorlu17:02:25

That might work out perfectly. Thanks for the idea! I'll look into the help/doc implementation.

seancorfield17:02:17

help/doc comes from tools.deps -- the -A:deps part above -- and works for all "tools" installs.

👍 2
seancorfield17:02:56

See clojure -A:deps -Ttools help/doc for example.

👍 2
teodorlu17:02:47

Off topic: I realy enjoy reading org.corfield.new. Really easy to understand what's going on! 💯

gratitude 2
borkdude18:02:40

> I don't know how neil could surface that. If these are docstrings via metadata or something, I'm sure we could print those somehow