You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-18
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Documentation stream intended for use within the gulp system.
22
22
23
23
**Parameters**
24
24
25
-
-`format`**\[[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** format - one of 'html', 'md', or 'json' (optional, default `md`)
25
+
-`format`**[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** format - one of 'html', 'md', or 'json' (optional, default `md`)
26
26
-`options`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** documentation options - the same as given to [documentation](https://github.com/documentationjs/documentation)
27
27
-`options.filename`**[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** custom filename for md or json output
28
28
-`formatterOptions`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** output options - same as given to documentation
@@ -34,60 +34,56 @@ Documentation stream intended for use within the gulp system.
34
34
var gulpDocumentation =require('gulp-documentation'),
35
35
var gulp =require('gulp');
36
36
// Out of the box, you can generate JSON, HTML, and Markdown documentation
37
-
gulp.task('documentation', function () {
38
-
37
+
gulp.task('documentation-readme-example', function () {
39
38
// Generating README documentation
40
-
gulp.src('./index.js')
39
+
returngulp.src('./index.js')
41
40
.pipe(gulpDocumentation('md'))
42
41
.pipe(gulp.dest('md-documentation'));
42
+
});
43
43
44
-
// Generating a pretty HTML documentation site
45
-
gulp.src('./index.js')
44
+
// Generating a pretty HTML documentation site
45
+
gulp.task('documentation-html-example', function () {
46
+
returngulp.src('./index.js')
46
47
.pipe(gulpDocumentation('html'))
47
48
.pipe(gulp.dest('html-documentation'));
49
+
});
48
50
49
-
// Generating raw JSON documentation output
50
-
gulp.src('./index.js')
51
+
// Generating raw JSON documentation output
52
+
gulp.task('documentation-json-example', function () {
53
+
returngulp.src('./index.js')
51
54
.pipe(gulpDocumentation('json'))
52
55
.pipe(gulp.dest('json-documentation'));
53
-
54
56
});
55
57
56
58
// Generate documentation for multiple files using normal glob syntax.
57
59
// Note that this generates one documentation output, so that it can
58
60
// easily cross-reference and use types.
59
61
gulp.task('documentation-multiple-files', function () {
60
-
61
-
gulp.src('./src/*.js')
62
+
returngulp.src('./src/*.js')
62
63
.pipe(gulpDocumentation('md'))
63
64
.pipe(gulp.dest('md-documentation'));
64
-
65
65
});
66
66
67
67
68
68
// If you're using HTML documentation, you can specify additional 'name'
69
69
// and 'version' options
70
70
gulp.task('documentation-html-options', function () {
71
-
72
-
gulp.src('./src/*.js')
71
+
returngulp.src('./src/*.js')
73
72
.pipe(gulpDocumentation('html', {}, {
74
73
name:'My Project',
75
74
version:'1.0.0'
76
75
}))
77
76
.pipe(gulp.dest('html-documentation'));
78
-
79
77
});
80
78
81
79
// Document non-JavaScript files with JSDoc comments using polyglot: true
82
80
gulp.task('documentation-for-cplusplus', function () {
0 commit comments