command-line-usage
Advanced tools
Comparing version 4.0.0 to 4.1.0-0
@@ -50,3 +50,2 @@ 'use strict' | ||
function getOptionNames (definition, optionNameStyles) { | ||
const names = [] | ||
let type = definition.type | ||
@@ -63,7 +62,9 @@ ? definition.type.name.toLowerCase() | ||
let result = '' | ||
if (definition.alias) { | ||
names.push(ansi.format('-' + definition.alias, optionNameStyles)) | ||
result = `${ansi.format(`--${definition.name}`, optionNameStyles)}, ${ansi.format('-' + definition.alias, optionNameStyles)} ${type}` | ||
} else { | ||
result = `${ansi.format(`--${definition.name}`, optionNameStyles)} ${type}` | ||
} | ||
names.push(ansi.format(`--${definition.name}`, optionNameStyles) + ' ' + type) | ||
return names.join(', ') | ||
return result | ||
} | ||
@@ -70,0 +71,0 @@ |
{ | ||
"name": "command-line-usage", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "4.0.0", | ||
"version": "4.1.0-0", | ||
"description": "Generates command-line usage information", | ||
@@ -27,10 +27,10 @@ "repository": "https://github.com/75lb/command-line-usage.git", | ||
"ansi-escape-sequences": "^3.0.0", | ||
"array-back": "^1.0.4", | ||
"array-back": "^2.0.0", | ||
"table-layout": "^0.4.0", | ||
"typical": "^2.6.0" | ||
"typical": "^2.6.1" | ||
}, | ||
"devDependencies": { | ||
"jsdoc-to-markdown": "^2.0.1", | ||
"test-runner": "^0.3.0" | ||
"jsdoc-to-markdown": "^3.0.0", | ||
"test-runner": "^0.4.0" | ||
} | ||
} |
@@ -10,3 +10,3 @@ [![view on npm](http://img.shields.io/npm/v/command-line-usage.svg)](https://www.npmjs.org/package/command-line-usage) | ||
## Synopis | ||
## Synopsis | ||
A usage guide is created by first defining an arbitrary number of sections, e.g. a description section, synopsis, option list, examples, footer etc. Each section has an optional header and some content. Each section must be of type <code><a href="#commandlineusagecontent">content</a></code> or <code><a href="#commandlineusageoptionlist">optionList</a></code>. | ||
@@ -127,3 +127,3 @@ | ||
**Kind**: inner typedef of <code>[commandLineUsage](#exp_module_command-line-usage--commandLineUsage)</code> | ||
**Kind**: inner typedef of [<code>commandLineUsage</code>](#exp_module_command-line-usage--commandLineUsage) | ||
**Properties** | ||
@@ -207,3 +207,3 @@ | ||
**Kind**: inner typedef of <code>[commandLineUsage](#exp_module_command-line-usage--commandLineUsage)</code> | ||
**Kind**: inner typedef of [<code>commandLineUsage</code>](#exp_module_command-line-usage--commandLineUsage) | ||
**Properties** | ||
@@ -259,2 +259,2 @@ | ||
© 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). | ||
© 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23455
298
2
Updatedarray-back@^2.0.0
Updatedtypical@^2.6.1