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

Use glob expression as file dependency #176

Open
Elberet opened this issue Sep 24, 2019 · 1 comment
Open

Use glob expression as file dependency #176

Elberet opened this issue Sep 24, 2019 · 1 comment

Comments

@Elberet
Copy link

Elberet commented Sep 24, 2019

I'm using broccoli-babel-transpiler with a bunch of custom Babel plugins. Among other things, these include a wildcard module resolver to allow for things such as import "tests/**/*.spec" - in other words, my source file depends on a glob expression, not a single file. When a new test is added to the project, or when a test file is removed, the source file containing the wildcard import (presumably /alltests.js or similar) needs to be rebuilt.

Can I achieve this with the current dependencyInvalidation mechanism?


On first reading of the code, I don't believe the current implementation can do this, but a fix should be fairly simple. Storing glob-like dependencies in a separate inverse-map and matching changes against each registered pattern after the regular dependent lookup should be sufficient.

Is this something you would be interested in?

@chriseppstein
Copy link
Contributor

I wrote the dependency invalidation feature. I think this would be a good feature to add. I'm happy to review your PR if you still want to make one up.

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

2 participants