-
Notifications
You must be signed in to change notification settings - Fork 69
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
JteModels extension with a 'Plain' (non-HTML engine) #370
Comments
Hi @checketts, |
Thanks for the Here is my imagined way of making it work: //Generate HTML based templates
jteExtension("gg.jte.models.generator.ModelExtension") {
property("language", "Kotlin")
property("excludePattern", ".*_text.*")
}
//Generate Text based templates
jteExtension("gg.jte.models.generator.ModelExtension") {
property("language", "Kotlin")
property("package", "gg.jte.generated.precompiled.text") // Will place the `Templates` classes in this package
property("contentType", "plain")
property("includePattern", ".*_text.*")
} Note the new |
jte-models can generate models for plain text templates. It uses the This does make it difficult to use both HTML and plain templates at the same time. I think you would have to put them in separate submodules. |
Sorry for the delay in responding, by the way. |
It would not be too hard to make your imagined configuration work, but it would require some code changes. |
Thanks for the response. My usecase is generating emails, since email has an HTML envelope and a plaintext. So separate modules wouldn't necessarily work for me. Are you aware of a way to pass separate |
The JTE Gradle plugin currently makes some assumptions that will prevent you configuring a separate task with different settings. It would be good to fix, but I don't have time available to work on that at the moment. |
doc for jte-models https://jte.gg/jte-models/ is un clear, and not working with maven, no StaticTemplates is generated |
|
In following the JteModels documentation I seem to be able to only create Html based templates.
However, I need to create a few text (plain) templates.
Does that support exist? Any hint on how that might be configured?
I'll be happy to provide a PR for the docs once I figure out what is missing...
The text was updated successfully, but these errors were encountered: