Makes it possible to put templates in subdirectories
This commit is contained in:
parent
7e8aa018e9
commit
e0922d5639
1 changed files with 10 additions and 2 deletions
12
README.md
12
README.md
|
@ -309,10 +309,18 @@ public record TransitionNode(String message, String toState) {
|
|||
### Meta
|
||||
|
||||
The meta container holds information about the template file used to generate the output file.
|
||||
It holds the subdirectory below the given `templateDir` where the template was found.
|
||||
```java
|
||||
public record Meta(
|
||||
List<String> templateDirectories,
|
||||
String templateFile
|
||||
) { }
|
||||
```
|
||||
|
||||
* `templateDirectories` holds the subdirectory below the given `templateDir` where the template was found.
|
||||
This is useful to generate e.g. java `package`statements like this:
|
||||
|
||||
```injectedfreemarker
|
||||
<#list meta.templateDirectories>package <#items as dir>${dir}<#sep>.</#items>;</#list>
|
||||
```
|
||||
```
|
||||
|
||||
* `templateFile` is the filename of the template (including the .ftl-ending) used to generate the output.
|
Loading…
Add table
Add a link
Reference in a new issue