mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-03 20:00:20 +03:00
chore: move boxen options to constant
This commit is contained in:
parent
a51fd38e94
commit
a28d86ab7e
24
cli/index.ts
24
cli/index.ts
|
@ -66,6 +66,14 @@ export const mimeTypes = {
|
|||
|
||||
const BUNDLES_DIR = dirname(require.resolve('redoc'));
|
||||
|
||||
const boxenOptions = {
|
||||
title: 'DEPRECATED',
|
||||
titleAlignment: 'center',
|
||||
padding: 1,
|
||||
margin: 1,
|
||||
borderColor: 'red',
|
||||
} as boxen.Options;
|
||||
|
||||
const builderForBuildCommand = yargs => {
|
||||
yargs.positional('spec', {
|
||||
describe: 'path or URL to your spec',
|
||||
|
@ -185,13 +193,7 @@ YargsParser.command(
|
|||
console.log(`
|
||||
${boxen(
|
||||
'This package is deprecated now.\n\nPlease use `@redocly/cli preview-docs <api>` instead.',
|
||||
{
|
||||
title: 'DEPRECATED',
|
||||
titleAlignment: 'center',
|
||||
padding: 1,
|
||||
margin: 1,
|
||||
borderColor: 'red',
|
||||
},
|
||||
boxenOptions,
|
||||
)}`);
|
||||
return res;
|
||||
},
|
||||
|
@ -481,13 +483,7 @@ function notifyDeprecation(res: YargsParser.Arguments): YargsParser.Arguments {
|
|||
console.log(
|
||||
boxen(
|
||||
'This package is deprecated now.\n\nPlease use `@redocly/cli build-docs <api>` instead.',
|
||||
{
|
||||
title: 'DEPRECATED',
|
||||
titleAlignment: 'center',
|
||||
padding: 1,
|
||||
margin: 1,
|
||||
borderColor: 'red',
|
||||
},
|
||||
boxenOptions,
|
||||
),
|
||||
);
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue
Block a user