mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +03:00
chore(cli): cli v0.5.0
This commit is contained in:
parent
20191e3e09
commit
7daa070311
10
cli/index.ts
10
cli/index.ts
|
@ -120,7 +120,7 @@ YargsParser.command(
|
||||||
handleError(e);
|
handleError(e);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.demandCommand()
|
.demandCommand()
|
||||||
.options('t', {
|
.options('t', {
|
||||||
alias: 'template',
|
alias: 'template',
|
||||||
|
@ -169,7 +169,7 @@ async function serve(port: number, pathToSpec: string, options: Options = {}) {
|
||||||
if (options.watch && existsSync(pathToSpec)) {
|
if (options.watch && existsSync(pathToSpec)) {
|
||||||
const pathToSpecDirectory = dirname(pathToSpec);
|
const pathToSpecDirectory = dirname(pathToSpec);
|
||||||
const watchOptions = {
|
const watchOptions = {
|
||||||
recursive: true
|
recursive: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
@ -243,13 +243,13 @@ async function getPageHTML(
|
||||||
ssr
|
ssr
|
||||||
? 'hydrate(__redoc_state, container);'
|
? 'hydrate(__redoc_state, container);'
|
||||||
: `init("spec.json", ${JSON.stringify(redocOptions)}, container)`
|
: `init("spec.json", ${JSON.stringify(redocOptions)}, container)`
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>`,
|
</script>`,
|
||||||
redocHead: ssr
|
redocHead: ssr
|
||||||
? (cdn
|
? (cdn
|
||||||
? '<script src="https://unpkg.com/redoc@next/bundles/redoc.standalone.js"></script>'
|
? '<script src="https://unpkg.com/redoc@next/bundles/redoc.standalone.js"></script>'
|
||||||
: `<script>${redocStandaloneSrc}</script>`) + css
|
: `<script>${redocStandaloneSrc}</script>`) + css
|
||||||
: '<script src="redoc.standalone.js"></script>',
|
: '<script src="redoc.standalone.js"></script>',
|
||||||
title,
|
title,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "redoc-cli",
|
"name": "redoc-cli",
|
||||||
"version": "0.4.0",
|
"version": "0.5.0",
|
||||||
"description": "ReDoc's Command Line Interface",
|
"description": "ReDoc's Command Line Interface",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": "index.js",
|
"bin": "index.js",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user