Support async transformFn when it returns Promise#2
Conversation
|
Now i see, that this module supports node 0.10 which doesn't support promises. Not sure if anone needs to support this old version of node, esp it's development env (it goees EOL very soon - E10/2016: https://github.com/nodejs/LTS). I would avoid any dependency on Promise shim ... I'll gladly change this PR to support callback-style async, but api for this is not straightforward |
|
Thanks for the PR. I expected someone might want this, but I didn't expect them to do the work for me. I'll take a look at it and hopefully merge it shortly. I don't think we need to support callback-style async; I agree the API would be problematic. But, I would like to keep supporting Node 0.10 for now; there seems to be a surprising number of people still shackled to that old thing. But I can take care of that. I'll likely just merge your changes and then make a few tweaks of my own. Thanks again. |
|
Thanks for feedback. On 19 Oct 2016 2:50 a.m., "Akim McMath" notifications@github.com wrote:
|
This commit adds support for asynchronous transformations. ## Community Contributions * #2 by @zbigg. Adds asynchronous support. ## Feautres * Asyncronous support by returning a promise ## Maintenance * Adds es6-promise dependency for compatibility with Node 0.10 to 0.12 * Update outdated dependencies * Update README.md with async documentation
|
Thanks a lot for this PR. I merged it, tweaked it to get the tests working, and now it's published as v1.1.0. |
This enables to use
gulp-transformwith async workflows usingPromises.Example usage:
Note, test cases are not yet updated, I will add test cases if there is interest in this PR in this or other form.