seancorfield / deps-new

Create new projects for the Clojure CLI / deps.edn
Eclipse Public License 1.0
353 stars 19 forks source link

Consider not using .clj for extension of template source files #39

Closed seancorfield closed 1 year ago

seancorfield commented 1 year ago

These files are not valid Clojure (and probably are not valid EDN either).

This should help avoid problems with tooling downstream, for anything that might assume it can load .clj files as Clojure code.

Probably ought to update the docs too, so folks building their own templates do not trip over this.

imrekoszo commented 1 year ago

For the sake of documentation and for anyone trying to look into the whys:

seancorfield commented 1 year ago

A note about this: deps-new can either copy entire directories (recursively) or individual files. When copying individual files, it's easy to take any source file and copy it to a .clj file (or whatever) but directories are copied "as-is" (modulo internal {{var}} substitution).

The existing templates contain a root folder that is copied to the new project folder and includes build.clj, so that file is going to need to be pulled out separately in order to change its file extension.

seancorfield commented 1 year ago

Fixed in v0.5.0