@antora/cli
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -53,2 +53,3 @@ #!/usr/bin/env node | ||
.usage('[options] [[command] [args]]') | ||
.helpOption('-h, --help', 'Output usage information.') | ||
.option('-r, --require <library>', 'Require library (aka node module) or script before executing command.') | ||
@@ -62,3 +63,3 @@ .on('option:require', (requirePath) => (cli.requirePaths = (cli.requirePaths || []).concat(requirePath))) | ||
.optionsFromConvict(convict(configSchema), { exclude: 'playbook' }) | ||
.option('--generator <library>', 'Site generator library', '@antora/site-generator-default') | ||
.option('--generator <library>', 'The site generator library.', '@antora/site-generator-default') | ||
.action(async (playbookFile, command) => { | ||
@@ -76,3 +77,3 @@ try { | ||
let msg = 'Generator not found or failed to load.' | ||
if (generator && !generator.startsWith('.')) msg += ` Try installing the \`${generator}' package.` | ||
if (generator && !generator.startsWith('.')) msg += ` Try installing the '${generator}' package.` | ||
exitWithError(err, cli.stacktrace, msg) | ||
@@ -79,0 +80,0 @@ } |
@@ -15,18 +15,3 @@ 'use strict' | ||
.reduce((accum, line) => { | ||
if (line.startsWith('Usage: ')) { | ||
if (this.parent) { | ||
let ancestor = this | ||
let commandCtx = [] | ||
while ((ancestor = ancestor.parent)) commandCtx.unshift(ancestor.name()) | ||
accum.push('Usage: ' + commandCtx.join(' ') + line.substr(6)) | ||
} else { | ||
accum.push(line) | ||
} | ||
} else if (line.startsWith(' -v,') || line.startsWith(' -h,')) { | ||
accum.push(line.trimRight().replace(' output', ' Output') + '.\n') | ||
} else if (~line.indexOf('"')) { | ||
accum.push(line.replace(QUOTED_DEFAULT_VALUE_RX, ' (default: $1)')) | ||
} else { | ||
accum.push(line) | ||
} | ||
~line.indexOf('"') ? accum.push(line.replace(QUOTED_DEFAULT_VALUE_RX, ' (default: $1)')) : accum.push(line) | ||
return accum | ||
@@ -33,0 +18,0 @@ }, []) |
@@ -39,6 +39,3 @@ 'use strict' | ||
option.description += ' (required)' | ||
} else if ( | ||
default_ !== undefined && | ||
(typeof default_ !== 'object' || default_.toString() !== '[object Object]') | ||
) { | ||
} else if (default_ && (typeof default_ !== 'object' || default_.toString() !== '[object Object]')) { | ||
option.default = default_ | ||
@@ -45,0 +42,0 @@ } |
{ | ||
"name": "@antora/cli", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "The command line interface for Antora.", | ||
@@ -21,12 +21,12 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/playbook-builder": "2.0.0", | ||
"commander": "^2.19.0" | ||
"@antora/playbook-builder": "2.0.1", | ||
"commander": "~3.0" | ||
}, | ||
"devDependencies": { | ||
"convict": "^4.4.1", | ||
"fs-extra": "^7.0.1", | ||
"kapok-js": "^0.10.1" | ||
"convict": "~5.1", | ||
"fs-extra": "~8.1", | ||
"kapok-js": "~0.10" | ||
}, | ||
"engines": { | ||
"node": ">= 8.0.0" | ||
"node": ">=8.11.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "files": [ |
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
10168
174
+ Added@antora/playbook-builder@2.0.1(transitive)
+ Addedcamelcase-keys@6.0.1(transitive)
+ Addedcommander@3.0.2(transitive)
+ Addedconvict@5.1.0(transitive)
+ Addeddeep-freeze-node@1.1.3(transitive)
+ Addedjs-yaml@3.13.1(transitive)
+ Addedjson5@2.1.02.1.3(transitive)
+ Addedmap-obj@4.3.0(transitive)
+ Addedmoment@2.24.0(transitive)
+ Addedquick-lru@4.0.1(transitive)
+ Addedvalidator@10.11.0(transitive)
+ Addedyargs-parser@13.0.0(transitive)
- Removed@antora/playbook-builder@2.0.0(transitive)
- Removedcamelcase-keys@5.2.0(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconvict@4.4.1(transitive)
- Removeddeep-freeze@0.0.1(transitive)
- Removeddepd@1.1.2(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjson5@1.0.12.2.3(transitive)
- Removedmap-obj@3.1.0(transitive)
- Removedmoment@2.22.2(transitive)
- Removedquick-lru@1.1.0(transitive)
- Removedvalidator@10.8.0(transitive)
- Removedyargs-parser@11.0.0(transitive)
Updatedcommander@~3.0