@abios/abios-redoc-cli 中文文档教程
abios-redoc-cli
Abios ReDoc 的命令行界面
Installation
你可以使用 abios 的 redoc 分支cli 通过全局安装 @abios/abios-redoc-cli
。\ 运行:yarn global add @abios/abios-redoc-cli
。
Usage
以下两个命令可用:
abios-redoc-cli serve [spec]
- starts the server withspec
rendered with Abios ReDoc. Supports SSR mode (--ssr
) and can watch the spec (--watch
)abios-redoc-cli bundle [spec]
- bundles spec and ReDoc into zero-dependency HTML file.
一些示例:
- Bundle with main color changed to
orange
:$ abios-redoc-cli bundle [spec] --options.theme.colors.primary.main=orange
- Serve with
nativeScrollbars
option set to true:$ abios-redoc-cli serve [spec] --options.nativeScrollbars
- Bundle using custom template (check default template for reference):
$ abios-redoc-cli bundle [spec] -t custom.hbs
- Bundle using custom template and add custom
templateOptions
:$ abios-redoc-cli bundle [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"
有关更多详细信息,请运行 abios-redoc-cli --help
。
请在此处查看原始的Redoc-CLI 存储库。
abios-redoc-cli
Abios ReDoc's Command Line Interface
Installation
You can use abios' fork of redoc cli by installing @abios/abios-redoc-cli
globally.\ Run: yarn global add @abios/abios-redoc-cli
.
Usage
Two following commands are available:
abios-redoc-cli serve [spec]
- starts the server withspec
rendered with Abios ReDoc. Supports SSR mode (--ssr
) and can watch the spec (--watch
)abios-redoc-cli bundle [spec]
- bundles spec and ReDoc into zero-dependency HTML file.
Some examples:
- Bundle with main color changed to
orange
:$ abios-redoc-cli bundle [spec] --options.theme.colors.primary.main=orange
- Serve with
nativeScrollbars
option set to true:$ abios-redoc-cli serve [spec] --options.nativeScrollbars
- Bundle using custom template (check default template for reference):
$ abios-redoc-cli bundle [spec] -t custom.hbs
- Bundle using custom template and add custom
templateOptions
:$ abios-redoc-cli bundle [spec] -t custom.hbs --templateOptions.metaDescription "Page meta description"
For more details run abios-redoc-cli --help
.
See the original Redoc-CLI repo here.