gulp-apidocjs
v0.1.3
Published
RESTful web API Documentation Generator
Downloads
12
Readme
gulp-apidocjs
Generates a RESTful web API Documentation. Documentation at apidocjs.com
Uses the apidoc library.
How It Works
/path/api/stuff.js
:
/**
* @api {get} /user/:id Request User information
* @apiName GetUser
* @apiGroup User
*
* @apiParam {Number} id Users unique ID.
*
* @apiSuccess {String} firstname Firstname of the User.
* @apiSuccess {String} lastname Lastname of the User.
*/
Install
Install with npm
npm install --save-dev gulp-apidoc
Usage
var gulp = require('gulp'),
apidoc = require('gulp-apidocjs');
gulp.task('apidoc', function(cb){
apidoc.exec({
src: "example/",
dest: "build/"
}, cb);
});
With options:
var gulp = require('gulp'),
apidoc = require('gulp-apidocjs');
gulp.task('apidoc',function(cb){
apidoc.exec({
src: "example/",
dest: "build/",
debug: true,
includeFilters: [ ".*\\.js$" ]
}, cb);
});
Other options checkout.
API
apidoc(options)
options.src
Type: String
options.dest
Type: string
Default: doc/
options.debug
Type: Boolean
Default: false
options.silent
Type: Boolean
Default: false
options.log
Type: Boolean
Default: true
options.includeFilters
Type: Array
Default: []