mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 14:14:56 +03:00
Fix typings, because compile:cli
fails with errors
This commit is contained in:
parent
d197c0feda
commit
09139766bd
18
cli/index.ts
18
cli/index.ts
|
@ -61,15 +61,17 @@ YargsParser.command(
|
||||||
return yargs;
|
return yargs;
|
||||||
},
|
},
|
||||||
async argv => {
|
async argv => {
|
||||||
|
const port = Number(argv.port);
|
||||||
|
const spec = String(argv.spec);
|
||||||
const config = {
|
const config = {
|
||||||
ssr: argv.ssr,
|
ssr: Boolean(argv.ssr),
|
||||||
watch: argv.watch,
|
watch: Boolean(argv.watch),
|
||||||
templateFileName: argv.template,
|
templateFileName: String(argv.template),
|
||||||
redocOptions: argv.options || {},
|
redocOptions: argv.options || {},
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await serve(argv.port, argv.spec, config);
|
await serve(port, spec, config);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
handleError(e);
|
handleError(e);
|
||||||
}
|
}
|
||||||
|
@ -108,10 +110,10 @@ YargsParser.command(
|
||||||
async argv => {
|
async argv => {
|
||||||
const config = {
|
const config = {
|
||||||
ssr: true,
|
ssr: true,
|
||||||
output: argv.o,
|
output: String(argv.o),
|
||||||
cdn: argv.cdn,
|
cdn: Boolean(argv.cdn),
|
||||||
title: argv.title,
|
title: String(argv.title),
|
||||||
templateFileName: argv.template,
|
templateFileName: String(argv.template),
|
||||||
redocOptions: argv.options || {},
|
redocOptions: argv.options || {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user