redoc/cli
2019-03-15 17:10:31 +02:00
..
.npmignore
Dockerfile Feature/dockerize redoc cli (#614) 2018-11-27 09:36:06 +02:00
index.ts chore: fix cli declarations 2019-03-11 17:58:23 +02:00
package.json chore(cli): redoc-cli v0.8.3 2019-03-15 17:10:31 +02:00
README.md feat(cli): Add templateOptions param to pass additional data to custom template (#792) 2019-01-31 09:51:44 +08:00
template.hbs
yarn.lock fix(cli): add node-libs-browser to the deps 2019-03-15 17:09:40 +02:00

redoc-cli

ReDoc's Command Line Interface

Installation

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

Usage

Two following commands 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.primary.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
  • Bundle using custom template and add custom templateOptions:
    $ redoc-cli bundle [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"

For more details run redoc-cli --help.