-
Notifications
You must be signed in to change notification settings - Fork 93
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
Can't run call gulp-useref from parallel gulp workflows #201
Comments
I think I'm facing the same issue, although I'm still using gulp 3. To support localisation (in a SEO friendly way) I process the resources in parallel streams, one for each supported locale (called version in code). My minification task looks like this: gulp.task('minify', function () {
return execForLocales(function (version) {
return gulp.src(version.tmp + '/*.html')
.pipe(useref())
.pipe(defer())
.pipe(gulpif('*.html', htmlmin({
collapseWhitespace: true,
conservativeCollapse: true,
removeComments: false,
minifyCSS: true,
minifyJS: true
})))
.pipe(gulpif('*.js', uglify()))
.pipe(gulpif('*.css', cssnano()))
.pipe(gulp.dest(version.dist));
});
});
function execForLocales(task) {
var tasks = versions.map(function (version) {
return task(version);
});
return merge(tasks);
} This all works if I process it for one locale only but fails without any error if I try to process more locales. |
Yup seems similar alright, me using gulp4 probably has nothing to do with On Mon, Apr 11, 2016 at 12:38 PM Jonas Zuberbuehler <
|
+1 - this is also a problem for our parallel build pipeline |
Still hoping for @jonkemp to weigh in on this.. |
Have you tried it with the latest version 3.1.0? |
Yep, still have the same problems. |
I am working on a refactor which would get rid of streamManager.js. I plan on merging it in sometime this weekend. That may do what you are wanting. |
…ion leading to cssstats not running jonkemp/gulp-useref#201
Yeah, looks like reverting to 3.0.4 has resolved this issue for now, until @jonkemp merges in his changes to remove streamManager |
Version 3.1.2 is out. Please try with the latest version and see if that fixes the issue. |
Just hit the same issue running 3.1.2 |
Same issue running 3.1.2 except it's june of 2017 now...... |
@NullSoldier let me know if you're willing to help! |
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:
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.
The text was updated successfully, but these errors were encountered: