I am currently working with throught2 module to write gulp plugin to replace something in the buffer, below is a simplified version of it
module.exports = function(replaceData: DataChange | DataChange[]) {
let count = 0;
return through.obj(function (file: any, encoding: any, callback: any) {
this.push(file);
callback(null, file);
console.log('@COUNT: ', ++count);
});
};
I found out that it will pick up only 8 files and will continue, ignoring the others, my output will be like:
@COUNT: 1
@COUNT: 2
...
@COUNT: 8
If I don't return anything in callback
module.exports = function(replaceData: DataChange | DataChange[]) {
let count = 0;
return through.obj(function (file: any, encoding: any, callback: any) {
this.push(file);
callback();
console.log('@COUNT: ', ++count);
});
};
it will process 16 files. How to increase the number of files through will pick up?