redoc/cli
2018-03-20 13:01:45 +02:00
..
.npmignore fix: move cli to a separate npm package 2018-03-18 11:15:17 +02:00
index.ts fix(cli): fix output option type 2018-03-20 13:01:45 +02:00
package.json fix(cli): fix crash 2018-03-20 12:51:23 +02:00
README.md chore: fix lint issues 2018-03-20 11:52:08 +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.