Fork me on GitHub
#deps-new
<
2023-03-30
>
practicalli-johnny10:03:41

In a project created with the template template, i noticed several *.tmpl files in the root of the new project. Are these remnants from the original template template or do they have significance in the new project I created? My assumption is that I can delete these *.tmpl files in the root of the new project as my own template code is all under resources (but I am still reading through the deps-new docs 🙂 )

├── build.clj
├── build.tmpl
├── CHANGELOG.md
├── deps.edn
├── deps.tmpl
├── doc
│   └── intro.md
├── pom.xml
├── README.md
├── resources
...
├── template.tmpl

seancorfield15:03:30

This may be a bug. The .tmpl extension is intended to avoid tooling trying to read invalid files. Can you open an issue on GH for me to look into?

practicalli-johnny16:03:22

sure will... thanks. I assume its with the changeover to to the .tmpl filename extension.

practicalli-johnny11:03:35

I am assuming multiple templates can be defined within the same project, as they are defined in a self contained directory under resources/template/template-name with a template.edn declarative config controlling how the template is assembled. Specific src and test file for each template are under the respective src and test tees. The advantage I see of multiple templates in one project is that only one git repository needs to be added to the class path and then templates can be referred to via their namespace, e.g. :template practicalli.template/service . So I can simply add a template for api, library, etc Is there anything to be aware of that would break this approach (so long as I do not name any templates the same as the deps-new built in templates) For reference, the new project structure with one template looks as follows

seancorfield15:03:24

That seems very reasonable to me.