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 11var through2 = require ( 'through2' ) ,
2- File = require ( 'vinyl' ) ,
3- documentation = require ( 'documentation' ) ;
2+ File = require ( 'vinyl' ) ;
43
54/**
65 * Documentation stream intended for use within the gulp system.
@@ -39,9 +38,26 @@ var through2 = require('through2'),
3938 * }))
4039 * .pipe(gulp.dest('documentation'));
4140 * });
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+ *
4256 */
43- module . exports = function ( options ) {
57+ module . exports = function ( options , documentation ) {
4458 options = options || { } ;
59+ documentation = documentation || require ( 'documentation' ) ;
60+
4561 var docOptions = {
4662 github : ! ! ( options . github || options . g ) ,
4763 shallow : options . shallow || false
You can’t perform that action at this time.
0 commit comments