I'm trying to create a new project with clj-new. In ~/.clojure/deps.edn [copied from practicalli] .. the exec fn looks like this
:project/new
{:replace-deps {com.github.seancorfield/clj-new {:mvn/version "1.2.399"}}
:exec-fn clj-new/create
:exec-args {:template app :name practicalli/playground}
:main-opts ["--main" "clj-new.create"]}
The following command does not work
clj -M:project/new :template lib :name mygroup/myproject
The following does
clj -M:project/new lib mygroup/myproject
But as per https://clojure.org/reference/deps_and_cli
I should be using
clj -M:project/new :template lib :name mygroup/myproject
to override arguments
Any thoughts on what's going wrong?"does not work" == ?
if you're using :exec-fn and :exec-args, then those are only used with clj -X
perhaps you just need to s/-M/-X/
I see. Let me try it out. Thks!
@rdsr You might want to look at the clj-new documentation itself: https://github.com/seancorfield/clj-new
The alias is working correctly when the appropriate argument types and execution option is used
-M uses string arguments
-X uses key value pair arguments
Unless a specific Leiningen template is required, I suggest using the deps-new project.
Practicalli Clojure CLI Config defines the :project/create alias to use this project, which also includes additional templates
https://practical.li/clojure/clojure-cli/projects/templates/
@jr0cket thks yes that was my experience as well as u specified.