1.0.0 • Published 3 years ago

@comodinx/api-doc v1.0.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
3 years ago

API Doc generator

@comodinx/api-doc is a Node.js API Doc generator.

This module will be in charge of assembling the README corresponding to the specified documentation, in APIDocJs format, on your controllers/routes/endpoints.

Index

Download & Install

NPM

    npm install @comodinx/api-doc

Source code

$ git clone https://gitlab.com/comodinx/api-doc.git
$ cd api-doc
$ npm install

How is it used?

Configure

In your package.json, set next script

{
  ...
  "scripts": {
    "doc": "comodinx-api-doc",
    ...
  }
  ...
}

Options

ArgumentAliasValueDefault valueDescription
markdownmfile pathdoc.mdDefault markdown file path.
groupgpath''Group application name. (Gitlab/Github group/user name)
dirnamedpathcurrent cwd directoryApplication dirname.
namenpathBase name for current pathApplication name.
helphbooleanfalseOutput usage information.

Examples

Custom markdown

Use a custom README markdown.

Custom markdown :: Case 1:

Directly on package.json script.

{
  ...
  "scripts": {
    "doc": "comodinx-api-doc -m ./README.template.md",
    ...
  }
  ...
}
Custom markdown :: Case 2:

By command line.

$ npm run doc -- -m ./README.template.md

Next?

Enjoy the magic and I owe you the documentation