gulp integration for jsdoc3 cli
npm install @sugarcrm/gulp-jsdoc3[![NPM version][npm-image]][npm-url]
Install gulp-jsdoc as a development dependency:
``shell`
npm install --save-dev @sugarcrm/gulp-jsdoc3
`javascript
var jsdoc = require('gulp-jsdoc3');
gulp.task('doc', function (cb) {
gulp.src(['README.md', './src/*/.js'], {read: false})
.pipe(jsdoc(cb));
});
`
You can also pass in your own config to override the defaults. All CLI options can be specified here.
`javascript
var jsdoc = require('gulp-jsdoc3');
gulp.task('doc', function (cb) {
var config = require('./jsdoc.json');
gulp.src(['README.md', './src/*/.js'], {read: false})
.pipe(jsdoc(config, cb));
});
`
Another good example is in this project's gulpfile!
ink-docstrap is used as the default layout but you can easily override it in your config like this:
``
{
"templates": {
"default": {
// Set my own layout file
"layoutFile": "./layout.tmpl"
}
}
}
DEBUG=gulp-jsdoc3` Notes
This is a reasonable attempt to wrap jsdoc using gulp as thinly as possible. All files are added after the cli.
i.e. jsdoc -c config -t node_modules/ink-docstrap/template gulpFile1 gulpFile2`
I would like to thank Mangled Deutz @ gulp-jsdoc for the original implementation.
License
-------------
Apache-2.0 License
[npm-url]: https://npmjs.org/package/@sugarcrm/gulp-jsdoc3
[npm-image]: https://badge.fury.io/js/gulp-jsdoc3.png