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

Support glob pattern for components directory #32

Open
jnv opened this issue Dec 17, 2018 · 1 comment
Open

Support glob pattern for components directory #32

jnv opened this issue Dec 17, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@jnv
Copy link
Contributor

jnv commented Dec 17, 2018

Instead of specyfing componentsPath as e.g. ../components I could say:

['components/**/*.js', '!components/**/*.test.js']

to register all the components without their tests.

Use package such as fast-glob.

Bonus: Make it async.

@jnv jnv added the enhancement New feature or request label Dec 17, 2018
@jnv
Copy link
Contributor Author

jnv commented Dec 20, 2018

Though I wonder whether we could avoid these mappings completely or move them to a different layer? The biggest disadvantage with current solution is that you need to re-scan components directory on every Program instatiation and in the end you are duplicating native require functionality, though with some security measures. Perhaps this could be pulled out to some customisable component name mapper with a separate cache?

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

No branches or pull requests

1 participant