From e0922d5639f1f5a5e7a17b264439a10b92bfa9f4 Mon Sep 17 00:00:00 2001 From: Johan Maasing Date: Fri, 2 May 2025 09:25:27 +0200 Subject: [PATCH] Makes it possible to put templates in subdirectories --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7dc6cc1..3262cf7 100644 --- a/README.md +++ b/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 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>.; -``` \ No newline at end of file +``` + +* `templateFile` is the filename of the template (including the .ftl-ending) used to generate the output. \ No newline at end of file