Open u007 opened 10 months ago
what's your workaround?
i return a boolean variable in prompt, and do a ternary on template like this. instead of writing to the actual file, i wrote it to the .tmp directory to avoid replacing the file
---
to: "<%= generateList ? 'pages/cp1/' : '.tmp/void/' %><%=pluralName%>/[<%=name%>Id]/index.vue"
---
@u007 You can just return null and it wont generate. That's a lot better than putting files into .tmp. https://www.hygen.io/docs/templates/#conditional-rendering
i wish this could work:
ive my work around, but would love to see this instead