I am trying to switch from Grunt to Gulp and I have a problem:
I read two streams from two files
var fileStream = gulp.src(file); var injectionStream = gulp.src(injection) .pipe(replace('#class-name#', argv.cname));
If my console argument "-remove" is missing, I have no problem concatenating these threads
.pipe(concat('animation.styl')) .pipe(gulp.dest('./dist'))
However, when "-remove" is true, I want to remove the injection, in other words, subtract the injection stream from fileStream.
I tried:
var es = require('event-stream'); es.replace() var replace = require('gulp-replace');
It works with strings, but I cannot succeed in streams read from files. Can someone give me a little hint?
And maybe this is the wrong tool for the generation task, and I should stay with Grunt and / or other tools like yo, etc.
Thank you for your time!
source share