-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package, deploy and install subtemplates independently #142
Comments
Sub templates are structurally no different to normal ones. The key difference is that the I think there's no issue with hosting sub-templates in the same way as normal templates. The question then becomes how to ensure that pure sub-templates (ones that can't work effectively with I see a couple of solutions:
At this point, I prefer 1 simply because I think it would require less work and is consistent with the behaviour of the Gradle plugin. On the downside, authors may dislike having to prefix template names with |
I prefer option 1 too as it doesn't tie templates to an specific repository option. |
The following questions and issues arose during the implementation of #147:
|
Based on the following use case: the griffon-mybatis-plugin requires 2 additional configuration files to work, Datasource.groovy and Mybatis.groovy. Additionally, domain classes and mapper files should be provided. All of these files follow a standard structure, so it makes sense to create them using templates.
The thing is that this plugin is applied to a project that has been already initialized using a different lazybones template (griffon-swing-java for example). You may also use this plugin with different toolkit/language combinations, thus packaging its templates with the griffon templates makes no sense.
What if subtemplates could be packaged and deployed in a standalone fashion? Installing a subtemplate would be a matter of locating the zip in a configured repo, download it and place it under $project/.lazybones. Thus means the "install-subtemplate" command (suggested name, change it if too cheesy) will work successfully only when invoked inside a project that was initialized using Lazybones (check can be performed by testing for the presence of the .lazybones directory).
The text was updated successfully, but these errors were encountered: