Color formatting for help

This commit is contained in:
Will Boyd
2025-03-06 16:17:58 -05:00
parent 428eb0b490
commit 6562b60b5c
+5
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env node
import chalk from 'chalk';
import * as commander from 'commander';
import path from 'path';
import * as intake from './src/intake.js';
@@ -13,6 +14,10 @@ import * as writer from './src/writer.js';
.name('node index.js')
.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')
.configureHelp({
styleOptionTerm: (str) => str.replace(/(<.*>)$/, chalk.gray('$1')),
styleOptionDescription: (str) => str.replace(/(\(.*\))$/, chalk.gray('$1'))
});
// gather config options from command line and wizard
await intake.getConfig();