File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ module.exports = function (options) {
34
34
return through2 . obj ( function document ( file , enc , cb ) {
35
35
files . push ( file ) ;
36
36
cb ( ) ;
37
- } , function ( ) {
37
+ } , function ( cb ) {
38
38
var that = this ;
39
39
documentation ( files . map ( function ( file ) {
40
40
return file . path ;
@@ -53,6 +53,6 @@ module.exports = function (options) {
53
53
} else {
54
54
console . error ( 'unknown type detected' ) ;
55
55
}
56
- } ) ) ;
56
+ } ) . on ( 'finish' , function ( ) { cb ( ) ; } ) ) ;
57
57
} ) ;
58
58
} ;
Original file line number Diff line number Diff line change @@ -25,3 +25,13 @@ test('gulp-documentation md custom name', function(t) {
25
25
t . end ( ) ;
26
26
} ) ;
27
27
} ) ;
28
+
29
+ test ( 'gulp-documentation exit callback' , function ( t ) {
30
+ t . plan ( 1 ) ;
31
+ gulp . src ( path . join ( __dirname , '/fixture.js' ) )
32
+ . pipe ( documentation ( { format : 'md' } ) )
33
+ . on ( 'end' , function ( ) { t . pass ( ) ; } )
34
+ . resume ( ) ;
35
+
36
+ } ) ;
37
+
You can’t perform that action at this time.
0 commit comments