pledbrook / lazybones

A simple project creation tool that uses packaged project templates.
Apache License 2.0
614 stars 102 forks source link

Composite templates #121

Open aalmiray opened 10 years ago

aalmiray commented 10 years ago

The use case is for an #opendolphin project where the client portion may be a Griffon project and the server side may be a Spring Boot project. It makes no sense for the opendolphin project to duplicate all options provided by those other templates.

What if there was a "master" template (opendolphin) that creates its own project structure, then delegates to the dependent templates (griffon-- and spring-actuator-boot for example). This feature may be related to lazybones' ability to be embedded (with itself in this case as it seems).

pledbrook commented 10 years ago

So would the Griffon and Spring Boot parts not be separate sub-projects? Regardless, the current workaround is for the README of the OpenDolphin template to specify the commands that the user should run afterwards to create the appropriate Griffon and Spring Boot parts.

One option that could work is to add a method on LazybonesScript that allows one template to install another.

aalmiray commented 10 years ago

Sort of. Both Griffon and Spring Boot projects are supposed to be subprojects of the overall opendolphin projects. The current workflow would be

I'd prefer if most of those steps were to be automated

pledbrook commented 10 years ago

Hmmm...would that last step require programmatic changes to source files after they've been generated? Or would the wiring happen through straightforward parameterisation, i.e. variable substitution into template files at project creation time?

aalmiray commented 10 years ago

Most likely after generation of subproject files. This means the root template must remain in control and be able to perform additional tasks after delegating to other templates. thus branching out to delegate templates cannot be a terminal operation.

pledbrook commented 9 years ago

I feel that issue #141 is the solution to this particular problem.