mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 08:36:33 +03:00
docs: add CLI examples
This commit is contained in:
parent
2732c89316
commit
3f6e221b4c
|
@ -167,14 +167,7 @@ Here are detailed [options docs](#redoc-options-object).
|
|||
|
||||
## ReDoc CLI
|
||||
|
||||
You can use redoc cli by installing `redoc-cli` globally or using [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b).
|
||||
|
||||
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.
|
||||
|
||||
For more details run `redoc-cli --help`.
|
||||
[See here](https://github.com/Rebilly/ReDoc/blob/react-rewrite/cli/README.md)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
@ -2,10 +2,26 @@
|
|||
|
||||
**[ReDoc](https://github.com/Rebilly/ReDoc)'s Command Line Interface**
|
||||
|
||||
[Documentation](https://github.com/Rebilly/ReDoc/tree/react-rewrite#redoc-cli)
|
||||
|
||||
## Installation
|
||||
TBD
|
||||
You can use redoc cli by installing `redoc-cli` globally or using [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b).
|
||||
|
||||
## Usage
|
||||
TBD
|
||||
|
||||
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](https://github.com/Rebilly/ReDoc/blob/react-rewrite/cli/template.hbs) for reference):
|
||||
|
||||
`$ redoc-cli bundle [spec] -t custom.hbs`
|
||||
|
||||
For more details run `redoc-cli --help`.
|
Loading…
Reference in New Issue
Block a user