jonkemp / jonkemp/gulp-useref

Can't run call gulp-useref from parallel gulp workflows

Open
#201 12 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.