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 config.preprocessorIgnorePatterns. #99

Closed
wants to merge 1 commit into from

Conversation

benjamn
Copy link
Contributor

@benjamn benjamn commented Jul 28, 2014

This is useful for not processing the contents of e.g. node_modules.

This is useful for not processing the contents of e.g. node_modules.
@jeffmo
Copy link
Contributor

jeffmo commented Jul 28, 2014

Could you just do this in your preprocessor function? This is what I've recommended to everyone else when they ask how to skip processing of certain files.

I also prefer that to a config option because it gives you full control over deciding how to short-circuit preprocessing without polluting the config API and/or asserting that regex is the only way. It also keeps the solution to the problem in the "one way to do it" zone.

@benjamn
Copy link
Contributor Author

benjamn commented Jul 28, 2014

One benefit of doing it here is that the paths to be ignored get normalized in the same way as all the other paths. But this is definitely not the only way to do it.

@jeffmo
Copy link
Contributor

jeffmo commented Aug 21, 2014

Well, I guess this seems to be a question that pops up a lot (and it actually doesn't hurt that much), so I won't fight it.

if (config.scriptPreprocessor) {
if (config.scriptPreprocessor &&
!config.preprocessorIgnorePatterns.some(function(pattern) {
return filePath.indexOf(pattern) >= 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a regexp test, not an indexOf search?

@jeffmo
Copy link
Contributor

jeffmo commented Jan 23, 2015

Any updates here? I'm happy to take this, but I think we just need to switch it to a regexp match instead of an indexOf

@zpao
Copy link
Contributor

zpao commented May 6, 2015

Merged in #303

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants