command-line-usage
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -22,3 +22,3 @@ module.exports = { | ||
{ name: "files", alias: "f", type: String, multiple: true, defaultOption: true, description: "The input files to process", group: "main" }, | ||
{ name: "timeout", alias: "t", type: Number, description: "Timeout value in ms", group: "main" }, | ||
{ name: "timeout", alias: "t", type: Number, description: "Timeout value in ms", group: "main", typeLabel: "<milliseconds>" }, | ||
{ name: "custom", type: Custom, description: "A custom class instance"} | ||
@@ -25,0 +25,0 @@ ] |
@@ -113,3 +113,3 @@ "use strict"; | ||
lines.addEmpty(); | ||
if (options.title) lines.addLine(getText(options.title, "underline")); | ||
if (options.title) lines.addLine(getText(options.title, [ "underline", "bold" ])); | ||
if (options.description) lines.addLine(getText(options.description)); | ||
@@ -126,3 +126,3 @@ if (options.title || options.description) lines.addEmpty(); | ||
options.usage.forms = arrayify(options.usage.forms); | ||
lines.addLine(getText(options.usage.title || "Usage", "underline")); | ||
lines.addLine(getText(options.usage.title || "Usage", [ "underline", "bold" ])); | ||
options.usage.forms.forEach(function(form){ | ||
@@ -146,3 +146,3 @@ lines.addLine(getText(form)); | ||
} | ||
lines.addLine(getText(title, "underline")); | ||
lines.addLine(getText(title, [ "underline", "bold" ])); | ||
if (description){ | ||
@@ -188,6 +188,7 @@ lines.addLine(getText(description)); | ||
var multiple = cliOption.multiple ? "[]" : ""; | ||
if (type) type = type === "boolean" ? "" : " <" + type + multiple + ">"; | ||
if (type) type = type === "boolean" ? "" : "<" + type + multiple + ">"; | ||
type = cliOption.typeLabel || type; | ||
if (cliOption.alias) names.push("-" + cliOption.alias); | ||
names.push("--" + cliOption.name + type); | ||
names.push("--" + cliOption.name + " " + type); | ||
return names.join(", "); | ||
@@ -194,0 +195,0 @@ } |
{ | ||
"name": "command-line-usage", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Generates command-line usage information", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/command-line-usage.git", |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24085
385
0