Skip to content

Stream is not ended. #3

@drinchev

Description

@drinchev

Hey there,

I was having problems when I'm using gulp documentation.

The stream seems to not terminate which breaks gulp flow.

gulp.task('gdocs', function () {
    return gulp.src('./any.js')
        .pipe(documentation({ format: 'md' }))
        .pipe(gulp.dest('md-documentation'));
});

which gives the following output :

$ gulp gdocs
[12:59:43] Using gulpfile /Volumes/Media/Projects/Gulpfile.js
[12:59:43] Starting 'gdocs'...
$ 

The problem I identified is on Line 37 that needs to have assigned callback. It should look like this :

return through2.obj(function document(file, enc, cb) {
   /* ... */
  }, function (callback) {
    /* ... */  
    .pipe(concat(function (output) {
       /* ... */
      cb();
    }));
  });

This seems to fix the problem and the callback is properly called when the stream flushes itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions