Closed cmoulliard closed 5 months ago
Nunjucks itself doesn't create files or directories at all, there's something else going on here and a lot of context missing from the question. It's not clear to me what's going on and I'm not sure how it's relevant to nunjucks.
Your are right. That works doing that using backstage template - https://backstage.io/docs/features/software-templates/writing-templates/#the-templating-syntax
id: hibernate-orm-rest-dataTemplate
name: Generating REst...
if: ${{ 'io.quarkus:quarkus-hibernate-orm-rest-data-panache' in parameters.extensions }}
action: fetch:template
input:
url: skeletons/
values:
java_package_name: ${{ parameters.java_package_name }}
java_package_path: ${{ parameters.java_package_name | replace(".", "/") }}
Question
Can nunjucks create a directory structure as proposed hereafter if the variable passed include "/" ?
What we have within the skeleton of the templates project
What we declare =>
java_package_name=io/quarkus
Expected result
What we got