refactor(v2): cleanup console output (#4979)

* refactor(v2): cleanup console output

* fix jest issue

Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
Alexey Pyltsyn 2021-06-16 12:37:28 +03:00 committed by GitHub
parent 8501db78a1
commit 41d9288e3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 382 additions and 339 deletions

View file

@ -28,9 +28,9 @@ function wrapCommand(fn) {
if (!semver.satisfies(process.version, requiredVersion)) {
console.log(
chalk.red(`\nMinimum Node version not met :(`) +
chalk.red(`\nMinimum Node.js version not met :(`) +
chalk.yellow(
`\n\nYou are using Node ${process.version}. We require Node ${requiredVersion} or up!\n`,
`\n\nYou are using Node ${process.version}. We require Node.js ${requiredVersion} or up!\n`,
),
);
process.exit(1);
@ -38,9 +38,9 @@ if (!semver.satisfies(process.version, requiredVersion)) {
cli
.command('migrate [siteDir] [newDir]')
.option('--mdx', 'Try to migrate MD to MDX too')
.option('--page', 'Try to migrate pages too')
.description('Migrate between versions of docusaurus website')
.option('--mdx', 'try to migrate MD to MDX too')
.option('--page', 'try to migrate pages too')
.description('Migrate between versions of Docusaurus website.')
.action((siteDir = '.', newDir = '.', {mdx, page}) => {
const sitePath = path.resolve(siteDir);
const newSitePath = path.resolve(newDir);
@ -49,7 +49,7 @@ cli
cli
.command('mdx [siteDir] [newDir]')
.description('Migrate markdown files to MDX')
.description('Migrate markdown files to MDX.')
.action((siteDir = '.', newDir = '.') => {
const sitePath = path.resolve(siteDir);
const newSitePath = path.resolve(newDir);