Skip to content
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

gulp.src push not all files to stream #777

Closed
JustBlackBird opened this issue Nov 17, 2014 · 2 comments
Closed

gulp.src push not all files to stream #777

JustBlackBird opened this issue Nov 17, 2014 · 2 comments

Comments

@JustBlackBird
Copy link

If a directory contains more than 16 files gulp.src pushes only first 16 and ignore others.

Here is my gulpfile.js:

var gulp = require('gulp'),
    through = require('through2');

gulp.task('list', function() {
    gulp.src('src/**/*.txt')
        .pipe(through.obj(function(file, enc, callback) {
            console.log(file.path);
            this.push(file);
            callback();
        }));
});

My package.json is:

{
  "devDependencies": {
    "gulp": "~3.8.10",
    "through2": "^0.6.3"
  }
}

My directories structure is:

src/
    01.txt
    02.txt
    03.txt
    04.txt
    05.txt
    06.txt
    07.txt
    08.txt
    09.txt
    10.txt
    11.txt
    12.txt
    13.txt
    14.txt
    15.txt
    16.txt
    17.txt
    18.txt
gulpfile.js
package.json

After I run gulp list I get the following results:

/tmp/gulp/src/01.txt
/tmp/gulp/src/02.txt
/tmp/gulp/src/03.txt
/tmp/gulp/src/04.txt
/tmp/gulp/src/05.txt
/tmp/gulp/src/06.txt
/tmp/gulp/src/07.txt
/tmp/gulp/src/08.txt
/tmp/gulp/src/09.txt
/tmp/gulp/src/10.txt
/tmp/gulp/src/11.txt
/tmp/gulp/src/12.txt
/tmp/gulp/src/13.txt
/tmp/gulp/src/14.txt
/tmp/gulp/src/15.txt
/tmp/gulp/src/16.txt

But there are no 17.txt and 18.txt files in the list!

@heikki
Copy link
Contributor

heikki commented Nov 17, 2014

See #716

@JustBlackBird
Copy link
Author

Returning files stream from gulp task really works. Thank you @heikki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants