Skip to content

Commit

Permalink
v9.0.0 change cli version text
Browse files Browse the repository at this point in the history
  • Loading branch information
KillyMXI committed Dec 2, 2022
1 parent 5dd346f commit 38ba0d8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/html-to-text-cli/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { handleArgv } from 'aspargvs';
import deepmerge from 'deepmerge';
import { htmlToText } from 'html-to-text';

import { version } from '../package.json';
import { version as httVersion } from '../../html-to-text/package.json';
import { version as cliVersion } from '../package.json';


const kebabToCamelCase = (str) => str
Expand All @@ -15,9 +16,13 @@ const camelToKebabCase = (str) => str
.replace(/\B([a-z0-9])([A-Z])/g, '$1-$2')
.toLowerCase();

const versionText =
`${cliVersion} - cli version
${httVersion} - converter version`;

const helpHeader =
`Advanced html to plain text converter
Version: ${version}
${versionText.replace(/^/gm, ' ')}
Usage:
- send input HTML document to stdin;
Expand All @@ -40,7 +45,7 @@ handleArgv({
key: kebabToCamelCase,
unkey: camelToKebabCase,
bin: () => 'html-to-text',
version: () => version,
version: () => versionText,
},
presets: {
'human': {
Expand Down

0 comments on commit 38ba0d8

Please sign in to comment.