File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 1
1
var through2 = require ( 'through2' ) ,
2
- File = require ( 'vinyl' ) ,
3
- documentation = require ( 'documentation' ) ;
2
+ File = require ( 'vinyl' ) ;
4
3
5
4
/**
6
5
* Documentation stream intended for use within the gulp system.
@@ -39,9 +38,26 @@ var through2 = require('through2'),
39
38
* }))
40
39
* .pipe(gulp.dest('documentation'));
41
40
* });
41
+ *
42
+ *
43
+ * // documentation with JSON output, default filename API.md and custom Documentation instance
44
+ * var documentation = require('gulp-documentation'),
45
+ * $documentation = require('documentation');
46
+ *
47
+ *
48
+ * gulp.task('documentation-json', function () {
49
+ * gulp.src('./index.js')
50
+ * .pipe(documentation({
51
+ * format: 'json'
52
+ * }, $documentation))
53
+ * .pipe(gulp.dest('documentation'));
54
+ * });
55
+ *
42
56
*/
43
- module . exports = function ( options ) {
57
+ module . exports = function ( options , documentation ) {
44
58
options = options || { } ;
59
+ documentation = documentation || require ( 'documentation' ) ;
60
+
45
61
var docOptions = {
46
62
github : ! ! ( options . github || options . g ) ,
47
63
shallow : options . shallow || false
You can’t perform that action at this time.
0 commit comments