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

Invalid behaviour when using inside lazypipe - Fixes #32 #35

Closed
wants to merge 1 commit into from
Closed

Invalid behaviour when using inside lazypipe - Fixes #32 #35

wants to merge 1 commit into from

Conversation

eduardolundgren
Copy link

No description provided.

@robrich
Copy link
Owner

robrich commented Jul 21, 2014

If the trueChild or falseChild is a function, you want them to get passed the vinyl-fs object and make a choice about each file as it passes through.

@robrich
Copy link
Owner

robrich commented Jul 21, 2014

Actually, I think I was incorrect. gulp-if thinks trueStream and falseStream are streams, not functions. Intriguing use-case.

@eduardolundgren
Copy link
Author

Accepting a function looks non-invasive way to handle that. It could be interpreted as a new use case for gulp-if to be able to accept functions, or in other words ability to dynamic create a stream, e.g:

if('*.js', function() { return trueStream; }, function() { return falseStream; })

@robrich
Copy link
Owner

robrich commented Jul 22, 2014

Looking at this further, it appears the bug wasn't in gulp-if, but was actually in lazypipe. Does the solution in #32 work for you? If so, it seems a more discoverable way to resolve this than teaching gulp-if how to use things that aren't streams.

@robrich
Copy link
Owner

robrich commented Jul 22, 2014

documented at https://github.com/robrich/gulp-if#works-great-inside-lazypipe and OverZealous/lazypipe#9. Thanks for your work documenting this issue.

@robrich robrich closed this Jul 22, 2014
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

Successfully merging this pull request may close these issues.

2 participants