Skip to content

Use glob expression as file dependency #176

@Elberet

Description

@Elberet

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions