feat: Support for other ways for declaring file-directories in a brick
- Dominant language
- Dart
- Stars
- 1.1k
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
## Description
With mustache templates, file names become too long to write and manage.
Git too throws when using file long names. (Example of error below)
```error: open("bricks/generate/__brick__/{{#has_tests}}test/widgets/{{#is_schematic_widget}}{{name.snakeCase()}}/{{#needs_theme_for_widget}}{{name.snakeCase()}}_theme_test.dart{{/needs_theme_for_widget}}{{/is_schematic_widget}}{{/has_tests}}"): Filename too long```
Although this issue can be resolved by `git config core.longpaths true`, writing with this template syntax becomes difficult for very large projects.
Is there any pattern or syntax that can help with this issue? Can we keep a file that describes file folder conditions?
What if we could keep a file `__brick__` that will decide to keep directories or files?
```
├───lib/some/file.dart
├───test/some/file_test.dart
└───__brick__
```
```__brick__
// This is for keeping `test/` directory if `has_tests` is true.
{{#has_tests}}test{{/has_tests}}
```
## Additional Context
### Example of file directory structure in `__brick__/`

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.