Skip to content
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

Make it easy (and well performing) to skip certain subdirectories/globs within component dirs #239

Open
timriley opened this issue Jun 24, 2022 · 0 comments

Comments

@timriley
Copy link
Member

timriley commented Jun 24, 2022

Right now, the only way is to do this:

config.component_dirs.add "some_dir" do
  dir.auto_register = proc do |component|
    relative_path = component.file_path.relative_path_from(root).to_s
    !relative_path.start_with?("config#{File::PATH_SEPARATOR}")
  end
end

Which feels a bit too roundabout, and also imposes a cost on every auto-registration.

We may be able to take inspiration on how Zeitwerk does this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant