Skip to content

Allow builders to specify by default that they look inside folders outside of lib #3965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rrousselGit opened this issue Apr 8, 2025 · 1 comment
Labels
type-enhancement A request for a change that isn't a bug

Comments

@rrousselGit
Copy link

Related to #2426

Some builders may want to deviate a bit from the Dart folder conventions ; such as defining an asset or api folder.

Currently, this requires any project that uses such generator to define a build.yaml with:

targets:
  $default:
    sources:
      - assets/**
      - api/**
      - ...

But this is inconvenient because it requires every user of said builder to redefine the build.yaml.

Proposal: Allow builders to define custom sources

Instead of asking users of a builder to specify the sources, could a builder itself do it?
For example:

builders:
  my_builder:
    ...
    sources:
      - api/**
      - assets/**

I've tried using:

builders:
  nameless:
    ...
    defaults:
      generate_for:
        include:
          - api/**

But this doesn't seem to do the same.

@rrousselGit rrousselGit added the type-enhancement A request for a change that isn't a bug label Apr 8, 2025
@davidmorgan
Copy link
Contributor

That sounds reasonable. I need to understand that code better, anyway, so happy to dig into it when I have some time to spare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants