mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-10 05:18:01 +02:00
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:
parent
8501db78a1
commit
41d9288e3d
86 changed files with 382 additions and 339 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue