Closed rthauby closed 10 years ago
Fwiw, this is what my task looks like:
gulp.task('compress:sass', function(){
return gulp.src(paths.dest.css + '/**/*.css')
.pipe( $.clean() )
.pipe( $.rev() )
.pipe( gulp.dest(paths.dest.css) )
.pipe( gulp.src(paths.dest.root + '/rev-manifest.json') )
.pipe( $.rev.manifest() )
.pipe( gulp.dest(paths.dest.root) );
});
Duplicate of #55.
The functionality described in the section you quoted from the readme
does not seem to be working atm; it was added by a recent PR.
I could definitely be mistaken, but I don't believe gulp
allows you to call gulp.src
inside a .pipe()
mid-stream. I get that write after end
error every time I try it.
Until this gets fixed, I recommend a combination of gulp-rename
and/or gulp-extend
as described by @bobthecow in #28 to avoid overwriting rev-manifest.json
.
@sindresorhus thoughts?
From the gulp changelog:
gulp.src is now a writable passthrough, this means you can use it to add files to your pipeline at any point
If that doesn't work it's a bug in gulp and should be reported there.
@sindresorhus I believe there are two unrelated bugs in play here:
gulp.src
mid-stream errors out. As you stated, that's gulp
specific and not relevant to gulp-rev
. Seems to be a known issue.rev-manifest.json
to src
in a way that works around the above bug (e.g. event-stream.merge
or gulp-filter
, both tried in #55) does not preserve the contents of the original rev-manifest.json
. gulp-rev
writes a new manifest on each run without regard to the old manifest passed in as source.If 2. is true, #51 is broken. Maybe that was all obvious... If so, my apologies. Just trying to help :)
@codekirei You're right, gulp.src seems to be broken... Just closing this as it's a duplicate of #55, as you noted. Really appreciate your help triaging issues :)
As described in this section of the README
Opening a second gulp.src gives me the following error, which I can't seem to work around. Any ideas?