> I saw tutorials mixing clj -A, -X and -M flags, but what's the difference between them?
That depends how you define your build targets (called aliases) in deps.edn. And there is also -T to call (public) functions in a namespace (file/program), e.g. when using build.clj - that's for building your jar.
-X calls a function that you can define using :exec-fn, :exec-args has it's arguments (usually a map)
-M calls the main function ('executes a program', if you will), it's 'normal' (command-line) arguments are passed using :main-opts
And btw. `clj` is just a wrapper around `clojure` that runs `clojure` in rlwrap. No need to use this if you do not use the REPL.
Here is a (big) template I've just finished yesterday:
deps.edn:
https://github.com/Release-Candidate/Clojure-Template/blob/m...
and it's usage:
https://github.com/Release-Candidate/Clojure-Template#build-...
build.clj - build a jar and run mkdocs
https://github.com/Release-Candidate/Clojure-Template/blob/m...