From 6562b60b5c6987d9956f3a852f7b58a908a4c8d8 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Thu, 6 Mar 2025 16:17:58 -0500 Subject: [PATCH] Color formatting for help --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 63fd3b9..90a183a 100644 --- a/index.js +++ b/index.js @@ -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();