redoc/cli
2018-03-20 11:39:53 +02:00
..
.npmignore fix: move cli to a separate npm package 2018-03-18 11:15:17 +02:00
index.ts feat(cli): add options to specify redoc options 2018-03-20 11:31:36 +02:00
package.json chore: add handlebars typings 2018-03-20 11:29:38 +02:00
README.md docs: add CLI examples 2018-03-20 11:39:53 +02:00
redoc-static.html fix: move cli to a separate npm package 2018-03-18 11:15:17 +02:00
template.hbs feat(cli): add --template option 2018-03-20 11:00:45 +02:00
yarn.lock chore: add handlebars typings 2018-03-20 11:29:38 +02:00

redoc-cli

ReDoc's Command Line Interface

Installation

You can use redoc cli by installing redoc-cli globally or using npx.

Usage

Twe following commans are available:

  • redoc-cli serve [spec] - starts the server with spec rendered with ReDoc. Supports SSR mode (--ssr) and can watch the spec (--watch)
  • redoc-cli bundle [spec] - bundles spec and ReDoc into zero-dependency HTML file.

Some examples:

  • Bundle with main color changed to orange:

    $ redoc-cli bundle [spec] --options.theme.colors.main=orange

  • Serve with nativeScrollbars option set to true:

    $ redoc-cli serve [spec] --options.nativeScrollbars

  • Bundle using custom template (check default template for reference):

    $ redoc-cli bundle [spec] -t custom.hbs

For more details run redoc-cli --help.