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

Add support to re-export files that are filtered using a module resolution-like behavior (e.g., file extensions) #654

Open
jgornick opened this issue Jun 24, 2024 · 2 comments

Comments

@jgornick
Copy link

Currently, barrelsby allows files to be filtered via a regular expression. However, this is limited when wanting to re-export files with the same name, but different extensions. For example, if I have files component.native.tsx and component.tsx and in my generated barrel file I only want the component.native.tsx file as I'm targeting a "native platform". This is a common use-case for module resolvers where you provide a collection of extensions and the resolver will try each one until it finds a match.

Barrelsby resolution logic is slightly different than a module resolver's logic, but there are some similarities that could allow specific logic to be applied.

Another approach could be to allow a function for include/exclude options that would give the implementer full control over the filtering logic.

Copy link

No activity has been seen recently, marking as stale. If this is a mistake please reach out to a collaborator

@jgornick
Copy link
Author

@bencoveney Bump...

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

No branches or pull requests

1 participant