This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-17
Channels
- # announcements (12)
- # babashka (27)
- # beginners (65)
- # biff (8)
- # calva (22)
- # clj-kondo (1)
- # clj-otel (5)
- # clojure (65)
- # clojure-europe (127)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-portugal (2)
- # clojure-uk (2)
- # clojurescript (18)
- # cursive (5)
- # data-science (3)
- # datahike (14)
- # datascript (3)
- # datomic (7)
- # deps-new (11)
- # emacs (31)
- # exercism (1)
- # fulcro (1)
- # honeysql (3)
- # hyperfiddle (38)
- # introduce-yourself (4)
- # leiningen (2)
- # malli (20)
- # meander (2)
- # missionary (3)
- # off-topic (4)
- # pathom (3)
- # practicalli (2)
- # reagent (5)
- # releases (1)
- # sci (1)
- # shadow-cljs (9)
- # xtdb (8)
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).
[...]
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?
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
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.
(the deps-new
README has that command in it, BTW, at the end of the Motivation section)
That might work out perfectly. Thanks for the idea! I'll look into the help/doc
implementation.
help/doc
comes from tools.deps
-- the -A:deps
part above -- and works for all "tools" installs.