webpack-apidoc

0.1.1 • Public • Published

webpack-apidoc

download-count dev-deps

Generates a RESTful web API Documentationusing 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 webpack-apidoc

Usage

const Apidoc = require('webpack-apidoc'),
..
plugins: [
    new Apidoc({
        src: "example/",
        dest: "build/"
    })
]
..

With options:

..
plugins: [
    new Apidoc({
        src: "example/",
        dest: "build/",
        template: "template/",
        debug: true,
        includeFilters: [ ".*\\.js$" ]
    })
]
..

Other options checkout.

Options

options.src

The folder to scan for apidoc documentation.

Type: String

options.dest

The folder where to output the generated files.

Type: String Default: doc/

options.template

Custom template to use for the output files.

Type: String

options.config

Type: String Default: options.src

options.debug

Type: Boolean Default: false

options.silent

Type: Boolean Default: false

options.verbose

Type: Boolean Default: false

options.simulate

Type: Boolean Default: false

options.includeFilters

Type: Array Default: []

Readme

Keywords

Package Sidebar

Install

npm i webpack-apidoc

Weekly Downloads

5

Version

0.1.1

License

MIT

Unpacked Size

1.33 MB

Total Files

114

Last publish

Collaborators

  • c0b41