I can't use Mason brick's conditional file generation because VS Code automatically create nested folders if I use folder1/folder2
approach while creating new file. For conditional generation it's required to create file following mustache syntax, for example:
{{#boolean_var}}file_name.dart{{/boolean_var}}
I've tried to achieve conditional file generation in my local Mason brick following BrickHub's docs and Observable Flutter: Building a Mason brick YouTube video in VS Code. Also I've tried to search how to disable automatic nested folder creation in VS Code, but didn't find any flags in settings.
I expect that VS Code will create file with name {{#boolean_var}}file_name.dart{{/boolean_var}}
, but it creates folder with name {{#boolean_var}}file_name.dart{{
and file inside with name boolean_var}}
.
What I have tried:
Result:
Felix Angelov (main contributor of BrickHub) answered here with working solution: use \
instead of /
during file creation in VS Code. It works