jsdoc plugin for gulp
This is an early release - if you find bugs, please say so.
Also, the following are currently not supported:
- plugins
 - tutorials
 - configuration from jsdoc.conf files
 
If you have a use-case that you can't do with straight gulp in a better way, please say so.
Install gulp-jsdoc as a development dependency:
npm install --save-dev gulp-jsdocThen, add it to your gulpfile.js:
var jsdoc = require("gulp-jsdoc");
gulp.src("./src/*.js")
  .pipe(jsdoc('./documentation-output'))gulp.src("./src/*.js")
  .pipe(jsdoc.parser(infos, name))
  .pipe(gulp.dest('./somewhere'))Will process any files it has been fed, and generate a new vinyl JSON usable by the generator to produce actual documentation.
By default, the filename is 'jsdoc.json' unless overriden by the name parameter.
Note that if you feed the parser a README.md file, this file will be rendered and used as a long description for your package.
eg:
gulp.src(["./src/*.js", "README.md"])
  .pipe(jsdoc.parser(infos, name))
  .pipe(gulp.dest('./somewhere'))The optional infos parameter is fed to jsdoc.
Type: String
Default: ''
Type: String
Default: ''
Type: String
Default: ''
Type: Array
Default: []
gulp.src("./somewhere/jsdoc.json")
  .pipe(jsdoc.generator('./destination'))or directly from the parser pipe:
gulp.src(["./src/*.js", "README.md"])
  .pipe(jsdoc.parser(infos, name))
  .pipe(jsdoc.generator('./destination'))By default, the generator uses the default template.
Type: String
Default: ''
Where the documentation will be outputed. If an infos object with a version / name was provided to the parser, these will be used in the final path.
You may optionnally specify a custom template, using the following syntax
{
	path: 'path_to_template',
	anyTemplateSpecificParameter: 'whatever'
}
As a courtesy, gulp-jsdoc bundles ink-docstrap templates, that you may use directly this way:
{
    path: 'ink-docstrap',
    systemName      : 'Something'',
    footer          : "Something",
    copyright       : "Something",
    navType         : "vertical",
    theme           : "journal",
    linenums        : true,
    collapseSymbols : false,
    inverseNav      : false
  }
See their site for more infos.
You may optionnally override default jsdoc behavior with this object:
  {
    'private': false,
    monospaceLinks: false,
    cleverLinks: false,
    outputSourceFiles: true
  }
gulp.src(["./src/*.js", "README.md"])
  .pipe(jsdoc('./destination'))... is simply a shortcut for
gulp.src(["./src/*.js", "README.md"])
  .pipe(jsdoc.parser())
  .pipe(jsdoc.generator('./destination'))Only the parser is really using streams. While the generator will read from the result of the parser, it will also read and write templates files on its own.
There is nothing we can do about that, unless changing the jsdoc templating API entirely, and all existing templates...



