Coder Social home page Coder Social logo

Comments (8)

mikededo avatar mikededo commented on August 11, 2024 1

Ah, I see the issue. Okey, I will probably not be able to fix it until the weekend due to work & uni.

from dartbarrelfilegenerator.

mikededo avatar mikededo commented on August 11, 2024

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 named index.dart instead of using the same name as the folder. Then, you would set this option to "dartBarrelFileGenerator.defaultBarrelName": "index" in your settings.json.
  • Prepending/Appending the folder name to the generated output file. Check the configuration for dartBarrelFileGenerator.prependFolderName and for dartBarrelFileGenerator.appendFolderName. This are boolean options and you can enable them by setting them to true in the settings.json (they are disabled by default).

As I said, I will look into the problem as soon as I can.

from dartbarrelfilegenerator.

saschaernst avatar saschaernst commented on August 11, 2024

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.

mikededo avatar mikededo commented on August 11, 2024

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.

saschaernst avatar saschaernst commented on August 11, 2024

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.

saschaernst avatar saschaernst commented on August 11, 2024

Happy New Year! Is there an ETA for an update?

from dartbarrelfilegenerator.

mikededo avatar mikededo commented on August 11, 2024

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.

saschaernst avatar saschaernst commented on August 11, 2024

Don't sweat it, I'll just use default names for the barrel files, that should be good enough

from dartbarrelfilegenerator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.