Closed PeterJ504 closed 1 year ago
Hi @PeterJ504!
Thanks for your proposal. What you propose seems a bit complex, as I would have to add some sort of string parsing, but I will think about it as it would allow a lot of flexibity in naming the files. I will deeply think into that.
As of now, what do you think of adding a boolean option as: "dartBarrelFileGenerator.prependFolderName": <true|false>
. If the option was set to true, it would keep the name of the file with the folder extension in as a prefix (which is what you propose).
It could also be the other way around, and also add: "dartBarrelFileGenerator.prependFolderName"
, which would also be a boolean, and it would add it to the end of the generated name: index_settings.dart
.
Your method seems to achieve the same functionality and is simpler. I approve :-)
Good morning @PeterJ504!
New version has been published! It has your feature added! If you have any doubt or encounter any issue, please open a new issue so that I can look into it.
Thank you for your idea and patience 💯
Could you add on option to combine the default name and directory name for the barrel file? For instance, in the the
settings
directory, I'd like to automatically addsettings_index.dart
orsettings_barrel.dart
as the file.Perhaps in the options, allow something like this:
"dartBarrelFileGenerator.defaultBarrelName": "<folder-name>_barrel"