boot-clj / boot-new

Generate new projects based on Boot Templates and/or Leiningen Templates!
https://clojars.org/boot/new
Eclipse Public License 1.0
155 stars 42 forks source link

Write simple launcher for clj tooling #41

Closed arichiardi closed 6 years ago

arichiardi commented 6 years ago

It would be really awesome, now that we have clj, to do something like:

clojure new <template-name>.

I think boot-new is already written in a way that would make this very easy to achieve. Moreover you are an awesome maintainer sooooo...

What do you think? Any blocker to this?

seancorfield commented 6 years ago

Boot new leans fairly heavily on Leiningen's template machinery (and includes a lot of its code, with permission). Definitely an interesting proposition tho', so I'll give it some thought!

seancorfield commented 6 years ago

A quick test reveals a stumbling block as-is: dependence on boot.core implies dependence on boot.App which is the Java shell around Boot.

So, at best I need to pull the code out of Boot new and strip it of the Boot dependencies -- but it will also need the ability to try looking up artifacts and adding them to the classpath (which is possible via tools.deps.alpha but I'm not familiar with the machinery).

I'll leave this open for now but it's not "easy" with Boot new as written, so I'll probably have to spawn a new project for this under my own org.

seancorfield commented 6 years ago
clj -Sdeps '{:deps {seancorfield/clj-new {:git/url "https://github.com/seancorfield/clj-new" :sha "653441d86834160124a94065c4d92a4a9ad12554"}}}' -m clj-new.create app myapp/clj-test

You can go add new issues to that repo now.