From 5230f865e36696595ada0638e70fe8e38ff8ede1 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Sun, 6 Oct 2019 11:56:09 +0800 Subject: [PATCH] Document other CLI-accessible commands --- README.md | 7 ++++++- bin/ncu | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9aab4ba1..b8aaa136 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ Options --configFilePath rc config file path (default: ./) --configFileName rc config file name (default: .ncurc.{json,yml,js}) + --cwd Used as current working directory for `spawn` in npm listing --dep check only a specific section(s) of dependencies: prod|dev|peer|optional|bundle (comma-delimited) -e, --error-level set the error-level. 1: exits with error code 0 if no @@ -99,6 +100,9 @@ Options -i, --interactive Enable interactive prompts for each dependency -j, --jsonAll output new package file instead of human-readable message + --jsonDeps Will return output like `jsonAll` but only lists + `dependencies`, `devDependencies`, and + `optionalDependencies` of the new package data. --jsonUpgraded output upgraded dependencies in json -l, --loglevel what level of logs to report: silent, error, warn, info, verbose, silly (default: warn) @@ -109,8 +113,9 @@ Options -p, --packageManager npm or bower (default: npm) --packageData include stringified package file (use stdin instead) --packageFile package file location (default: ./package.json) - --pre include -alpha, -beta, -rc. Default: 0. Default + --pre include -alpha, -beta, -rc. Default: 0. Default with --newest and --greatest: 1. + --prefix Used as current working directory in bower and npm -r, --registry specify third-party NPM registry --removeRange remove version ranges from the final package version -s, --silent don't output anything (--loglevel silent) diff --git a/bin/ncu b/bin/ncu index b81e7a73..c66d5694 100755 --- a/bin/ncu +++ b/bin/ncu @@ -21,6 +21,7 @@ program .usage('[options] [filter]') .option('--configFilePath ', 'rc config file path (default: ./)') .option('--configFileName ', 'rc config file name (default: .ncurc.{json,yml,js})') + .option('--cwd ', 'Used as current working directory for `spawn` in npm listing') .option('--dep ', 'check only a specific section(s) of dependencies: prod|dev|peer|optional|bundle (comma-delimited)') .option('-e, --error-level ', 'set the error-level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration). Default is 1.', cint.partialAt(parseInt, 1, 10), 1) .option('-f, --filter ', 'include only package names matching the given string, comma-or-space-delimited list, or /regex/') @@ -28,6 +29,7 @@ program // program.json is set to true in programInit if any options that begin with 'json' are true .option('-i, --interactive', 'Enable interactive prompts for each dependency') .option('-j, --jsonAll', 'output new package file instead of human-readable message') + .option('--jsonDeps', 'Will return output like `jsonAll` but only lists `dependencies`, `devDependencies`, and `optionalDependencies` of the new package data.') .option('--jsonUpgraded', 'output upgraded dependencies in json') .option('-l, --loglevel ', 'what level of logs to report: silent, error, minimal, warn, info, verbose, silly (default: warn)', 'warn') .option('-m, --minimal', 'do not upgrade newer versions that are already satisfied by the version range according to semver') @@ -36,6 +38,7 @@ program .option('--packageData', 'include stringified package file (use stdin instead)') .option('--packageFile ', 'package file location (default: ./package.json)') .option('--pre ', 'Include -alpha, -beta, -rc. Default: 0. Default with --newest and --greatest: 1') + .option('--prefix ', 'Used as current working directory in bower and npm') .option('-r, --registry ', 'specify third-party npm registry') .option('--removeRange', 'remove version ranges from the final package version') .option('-s, --silent', "don't output anything (--loglevel silent)")