You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
andcomponent.tsx
and in my generated barrel file I only want thecomponent.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.
The text was updated successfully, but these errors were encountered: