-
Notifications
You must be signed in to change notification settings - Fork 5
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 for streams #13
Comments
You can already pass streams as locals, you just can't then pipe them to the output. |
That's kinda what I meant, not much use having a stream in a jade template if you can't pump out the data. |
If you added a method to your stream that returns a promise you could then write something like: - stream.on('data', buf.push);
- yield stream.wait(); in your template. |
Would that wait until the whole stream has processed before outputting? |
The stream given by From what I understand, you are asking if you can interleave the jade stream with external streams coming via
with
I think that the solution given by @ForbesLindesay would work even though it would not handle backpressure on stream1 & stream2 (the on('data') will put them in flowing mode). As an answer to your question, yes, it would flush all the stream in the correct place. This is untested code but you could probably implement his solution with
and then in your jade file
Keep us posted ! |
Any chance there could be support for streams as locals?
The text was updated successfully, but these errors were encountered: