mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-20 07:04:14 +09:00
Color formatting for help
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
import chalk from 'chalk';
|
||||||
import * as commander from 'commander';
|
import * as commander from 'commander';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import * as intake from './src/intake.js';
|
import * as intake from './src/intake.js';
|
||||||
@@ -13,6 +14,10 @@ import * as writer from './src/writer.js';
|
|||||||
.name('node index.js')
|
.name('node index.js')
|
||||||
.helpOption('-h, --help', 'See the thing you\'re looking at right now')
|
.helpOption('-h, --help', 'See the thing you\'re looking at right now')
|
||||||
.addHelpText('after', '\nMore documentation is at https://github.com/lonekorean/wordpress-export-to-markdown')
|
.addHelpText('after', '\nMore documentation is at https://github.com/lonekorean/wordpress-export-to-markdown')
|
||||||
|
.configureHelp({
|
||||||
|
styleOptionTerm: (str) => str.replace(/(<.*>)$/, chalk.gray('$1')),
|
||||||
|
styleOptionDescription: (str) => str.replace(/(\(.*\))$/, chalk.gray('$1'))
|
||||||
|
});
|
||||||
|
|
||||||
// gather config options from command line and wizard
|
// gather config options from command line and wizard
|
||||||
await intake.getConfig();
|
await intake.getConfig();
|
||||||
|
|||||||
Reference in New Issue
Block a user