Proposal: alternate syntax for the character `/` in file systems
- Ngôn ngữ chính
- Dart
- Star
- 1.1k
- Fork
- 113
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The current syntax for conditional files and folders is functional, but generates a file system representation that is really hard to understand and maintain.
### Example:
If I want a brick to generate an `android.dart` file only if the boolean parameter `android` is true, I'm supposed to name a file `{{#android}}android.dart{{/android}}`.
This has the effect of generating a directory named `{{#android}}android.dart{{` that contains a file named `android}}`
View in the MacOS finder:

View in VSCode

This split in a directory and a file doesn't match at all how we think about a single file.
### Proposal
If another syntax for conditional files and folders was introduced, that doesn't include the character `/`, we could view them as regular files, which would match the mental model about them being a file.
Dummy suggestions:
- Could we use the double `##` symbol for closing tags? like `{{#android}}android.dart{{##android}}`
- Could we use another available symbol? like `{{#android}}android.dart{{^android}}`
### Migration path
If this new syntax was introduced, it could be distributed in a first step alongside the current syntax, but the current syntax would trigger a warning with a recommendation to migrate to the new syntax. Then after a few versions, the old syntax would go away.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.