@sugarcrm/gulp-jsdoc3

0.2.4 • Public • Published

gulp-jsdoc3

NPM version

jsdoc plugin for gulp

Installation

Install gulp-jsdoc as a development dependency:

npm install --save-dev @sugarcrm/gulp-jsdoc3

Usage

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.

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!

Overriding the default layout

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"
        }
    }
}

Debugging

Set env variable: 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
jsdoc does not allow for piped input, so this attempt may be considered a gulp anti-pattern. It also does not pass on output to be piped elsewhere.

I would like to thank Mangled Deutz @ gulp-jsdoc for the original implementation.

License

Apache-2.0 License

Package Sidebar

Install

npm i @sugarcrm/gulp-jsdoc3

Weekly Downloads

2

Version

0.2.4

License

Apache-2.0

Last publish

Collaborators

  • sugarcrm