gulp-apidoc ![Build Status](https://camo.githubusercontent.com/e9a15ba02159d0499a3f203f02e12eb4d3307c81faa6071a13ec18a05611139f/68747470733a2f2f696d672e736869656c64732e696f2f64617669642f617968616e6b7572752f67756c702d617069646f632e7376673f7374796c653d666c61742d737175617265)
Generates a RESTful web API Documentation. Documentation at apidocjs.com
Uses the apidoc library.
/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 with npm
npm install --save-dev gulp-apidoc
var gulp = require('gulp'),
apidoc = require('gulp-apidoc');
gulp.task('apidoc', function(){
apidoc.exec({
src: "example/",
dest: "build/"
});
});
With options:
var gulp = require('gulp'),
apidoc = require('gulp-apidoc');
gulp.task('apidoc',function(){
apidoc.exec({
src: "example/",
dest: "build/",
template: "template/",
debug: true,
includeFilters: [ ".*\\.js$" ]
});
});
Other options checkout.
Type: String
Type: String
Default: doc/
Type: String
Type: Boolean
Default: false
Type: Boolean
Default: true
Type: Array
Default: []