Can't run call gulp-useref from parallel gulp workflows
- Dominant language
- JavaScript
- Stars
- 700
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
I tried to run useref from two task in parallel, using the new gulp 4 _gulp.parallel_ method.
The result is that one of the tasks almost always gets an error (no stack),
or that I get the error **Error: stream.push() after EOF**.
After looking at index.js, I have a suspicion at to what the problem is:
``` javascript
streamManager = require('./lib/streamManager');
module.exports = function (options) {
streamManager.transforms = Array.prototype.slice.call(arguments, 1);
streamManager.options = options || {};
streamManager.additionalStreams();
return through.obj(streamManager.transformFunction, streamManager.flushFunction);
};
```
Instead of setting properties on a global streamManager object, you could just pass these in as arguments to a function?
If you approve, I'll try to find the time to submit a pull request this week.
Contributor guide
Assessment
This issue has not been assessed yet.