https://github.com/c0b41/webpack-apidoc
Apidoc for webpack plugin
https://github.com/c0b41/webpack-apidoc
api apidoc document plugin webpack
Last synced: 8 months ago
JSON representation
Apidoc for webpack plugin
- Host: GitHub
- URL: https://github.com/c0b41/webpack-apidoc
- Owner: c0b41
- Created: 2018-05-09T22:00:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-19T21:48:43.000Z (about 8 years ago)
- Last Synced: 2025-10-02T04:45:45.582Z (9 months ago)
- Topics: api, apidoc, document, plugin, webpack
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# webpack-apidoc


Generates a RESTful web API Documentationusing the [apidoc](https://github.com/apidoc/apidoc) library.
## How It Works
`/path/api/stuff.js`:
```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](https://npmjs.org/package/webpack-apidoc)
```
npm install --save-dev webpack-apidoc
```
## Usage
```js
const Apidoc = require('webpack-apidoc'),
..
plugins: [
new Apidoc({
src: "example/",
dest: "build/"
})
]
..
```
With options:
```js
..
plugins: [
new Apidoc({
src: "example/",
dest: "build/",
template: "template/",
debug: true,
includeFilters: [ ".*\\.js$" ]
})
]
..
```
Other options [checkout](https://github.com/apidoc/apidoc/blob/master/lib/index.js#L14-L21).
## 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: `[]`