Skip to content

Commit ba2bd5f

Browse files
committed
Document polyglot mode
1 parent 1caa020 commit ba2bd5f

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ $ npm install --save-dev gulp-documentation
1414

1515
## API
1616

17+
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
18+
1719
### documentation
1820

1921
Documentation stream intended for use within the gulp system.
@@ -74,6 +76,18 @@ gulp.task('documentation-html-options', function () {
7476
}))
7577
.pipe(gulp.dest('html-documentation'));
7678
79+
});
80+
81+
// Document non-JavaScript files with JSDoc comments using polyglot: true
82+
gulp.task('documentation-for-cplusplus', function () {
83+
84+
gulp.src('./src/*.cpp')
85+
.pipe(gulpDocumentation('html', { polyglot: true }, {
86+
name: 'My Project',
87+
version: '1.0.0'
88+
}))
89+
.pipe(gulp.dest('html-documentation'));
90+
7791
});
7892
```
7993

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ var File = require('vinyl');
5959
* .pipe(gulp.dest('html-documentation'));
6060
*
6161
* });
62+
*
63+
* // Document non-JavaScript files with JSDoc comments using polyglot: true
64+
* gulp.task('documentation-for-cplusplus', function () {
65+
*
66+
* gulp.src('./src/*.cpp')
67+
* .pipe(gulpDocumentation('html', { polyglot: true }, {
68+
* name: 'My Project',
69+
* version: '1.0.0'
70+
* }))
71+
* .pipe(gulp.dest('html-documentation'));
72+
*
73+
* });
6274
*/
6375
module.exports = function (format, options, formatterOptions) {
6476
var files = [];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "2.2.0",
55
"author": "Tom MacWright",
66
"dependencies": {
7-
"documentation": "^4.0.0-beta12",
7+
"documentation": "4.0.0-beta13",
88
"through2": "^2.0.1",
99
"vinyl": "^2.0.0"
1010
},

test-manual/multi/gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ gulp.task('documentation', function () {
99

1010
});
1111

12+
gulp.task('documentation-polyglot', function () {
13+
14+
gulp.src('./src-cpp/*.js')
15+
.pipe(gulpDocumentation('md', { polyglot: true }))
16+
.pipe(gulp.dest('cpp-documentation'));
17+
18+
});
19+
1220
gulp.task('documentation-shallow', function () {
1321

1422
gulp.src('./src/*.js')

0 commit comments

Comments
 (0)