babashka / neil

A CLI to add common aliases and features to deps.edn-based projects
MIT License
367 stars 27 forks source link

could improve documentation for building uberjar #140

Closed bo-tato closed 1 year ago

bo-tato commented 1 year ago

First thanks for making neil! It's quite nice for new clojure users like myself. Clojure already has a lot that's different to learn, so it's nice to just focus on the language and not have to also learn deps.edn and tools.build until needed for more complex projects and just have easy commands for basic tasks. Here's my experience building my first uberjar, maybe it's helpful for improving the documentation so other new users have an easier time, or maybe even neil could configure these things automatically:

  1. I follow readme that says neil add build :deps-deploy true and then clojure -T:build uber
  2. Get some confusing java errors when trying to run it, google around and find your blog which explains I need to add (:gen-class) to the namespace with main and add :main 'my-namespace to the b/uber map in build.clj
  3. Everything works :)

Maybe (:gen-class) could be added in the default new project template? Maybe it could search what namespace has (:gen-class) and (defn -main... and automatically set the :main key when it generates build.clj with neil add build :deps-deploy true? Maybe just link your blog post from the neil readme, cause it has good information people will miss if they just come to the github page

borkdude commented 1 year ago

PR welcome to add a link to the blog post :)

bo-tato commented 1 year ago

ok sent :)