Comments (8)
Ah, I see the issue. Okey, I will probably not be able to fix it until the weekend due to work & uni.
from dartbarrelfilegenerator.
Hi @saschaernst! Thanks for opening the issue! 👋🏼
I will look into it, but that is because it looks at the top folder car
and it checks if the barrel file it is already created, which, if there's not any additional configuration, is the same name as the folder. It is what happens in this case.
I do not know if it will add much complexity trying to fix this issue. Nonetheless, here are some solutions that you may want to try as of now:
- First of all you have the
dartBarrelFileGenerator.defaultBarrelName
configuration, which allows you to set up a default name for all your barrel files. Let's say you want them all namedindex.dart
instead of using the same name as the folder. Then, you would set this option to"dartBarrelFileGenerator.defaultBarrelName": "index"
in yoursettings.json
. - Prepending/Appending the folder name to the generated output file. Check the configuration for
dartBarrelFileGenerator.prependFolderName
and fordartBarrelFileGenerator.appendFolderName
. This areboolean
options and you can enable them by setting them totrue
in thesettings.json
(they are disabled by default).
As I said, I will look into the problem as soon as I can.
from dartbarrelfilegenerator.
Thanks for the quick reply. I'll have a look at your suggested solutions, but it would be nice if it could at least work for files with the same name in subdirectories.
Cheers
from dartbarrelfilegenerator.
What would your suggestions be for the generated name? In the example case you proposed, which would be the generated name of the barrel file?
from dartbarrelfilegenerator.
It could still be car.dart as long as the other car.dart is in a subdirectory. As it actually works with the 'Current folder with nested folders' option, it was very confusing when it didn't for the subfolders option
from dartbarrelfilegenerator.
Happy New Year! Is there an ETA for an update?
from dartbarrelfilegenerator.
Hi @saschaernst! Sorry for taking too long with the issue. I have studied it and it would involve quite a lot of code changes, which will take up more time that I can have.
I encourage you to propose a PR, otherwise you will have to wait a bit more, as I'm working from time to time on it...
Again, excuse me for the delay.
from dartbarrelfilegenerator.
Don't sweat it, I'll just use default names for the barrel files, that should be good enough
from dartbarrelfilegenerator.
Related Issues (20)
- Can't use extension when using multiple folder inside workspace HOT 1
- using excludeFileList to exclude main.dart HOT 3
- Windows 10 Command 'Export Dart files in current directory to dir_name.dart' resulted in an error HOT 9
- Dependency Dashboard
- Action Required: Fix Renovate Configuration
- Option for default name of barrel files HOT 7
- works incorrectly if filename and directory name are the same HOT 3
- Generate single file without generating in its sub folders HOT 5
- Combined option for default file names HOT 3
- Use generator option on multiple diectories HOT 1
- Option for putting generated file at the same level as target folder HOT 11
- Readme documentation is not up-to-date
- Exporting empty files HOT 3
- Don't export files with `part of` declarations HOT 3
- Add shortcuts HOT 5
- glob patterns not matching as expected HOT 5
- Update command names HOT 2
- how to have a shortcut to barreling command for a hard-coded folder? HOT 8
- Add support for `always_use_package_imports` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dartbarrelfilegenerator.