0.1.1 • Published 3 years ago

yaml-route-doc v0.1.1

Weekly downloads
4
License
MIT
Repository
-
Last release
3 years ago

YAML Route Documenter

Build and Run Tests ESLint Prettier

The main purpose of this package is:

  1. YAML in
  2. HTML out

Routes can either be documented for internal use, or for third parties (e.g. when documenting a REST API).

Quick start

Run the following commands:

> npm i -D yaml-route-documenter
> npx yaml-route-documenter --install
    # Follow the instructions given by the install tool

Please make sure you add the output folder to your .gitignore or equivalent. By default this will be {root}/output.

To generate the HTML use the command:

> npx yaml-route-documenter -c $PathToConfig
> yaml-route-documenter -c $PathToConfig # Drop the 'npx' when defining it as an npm script

Alternatively call it programmatically:

import * as documenter from "yaml-route-doc";

documenter.document("path/to/config.yml");

More Documentation

For more information about writing custom css please refer to the CSS Guide