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

Interpolation pattern modifiers #166

Open
guybedford opened this issue Mar 13, 2023 · 0 comments
Open

Interpolation pattern modifiers #166

guybedford opened this issue Mar 13, 2023 · 0 comments

Comments

@guybedford
Copy link
Owner

In interpolation patterns, it could be useful to support a new modifier syntax for eg handling excludes in the target space:

dep = "./src/##.ts"
targets = "lib/##[~(index|module)].js"

where if a dependency resulted in the invalid target, it would be automatically ignored, and conversely if building a target in the exclude space, it wouldn't match the interpolation.

Ideally we should use some sensible existing pattern system.

#[name] has been talked about for named parameters in some interpolation use cases, perhaps we just disambiguate via syntax eg via #{name} for that instead.

Effectively this syntax just allows providing a custom pattern instead of the default of **/* to match. The hard part as always with interpolation is handling bi-directional mapping support.

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