Skip to content

Commit

Permalink
Merge pull request #589 from brettz9/cli
Browse files Browse the repository at this point in the history
Document other CLI-accessible commands
  • Loading branch information
raineorshine committed Oct 7, 2019
2 parents 82dc319 + 5230f86 commit 789bc06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -87,6 +87,7 @@ Options

--configFilePath rc config file path (default: directory of `packageFile` or ./ otherwise)
--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
Expand All @@ -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)
Expand All @@ -111,6 +115,7 @@ Options
--packageFile package file location (default: ./package.json)
--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)
Expand Down
3 changes: 3 additions & 0 deletions bin/ncu
Expand Up @@ -20,13 +20,15 @@ program
.usage('[options] [filter]')
.option('--configFilePath <path>', 'rc config file path (default: directory of `packageFile` or ./ otherwise)')
.option('--configFileName <path>', 'rc config file name (default: .ncurc.{json,yml,js})')
.option('--cwd <path>', 'Used as current working directory for `spawn` in npm listing')
.option('--dep <dep>', 'check only a specific section(s) of dependencies: prod|dev|peer|optional|bundle (comma-delimited)')
.option('-e, --error-level <n>', '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 <matches>', 'include only package names matching the given string, comma-or-space-delimited list, or /regex/')
.option('-g, --global', 'check global packages instead of in the current project')
// 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 <n>', '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')
Expand All @@ -35,6 +37,7 @@ program
.option('--packageData', 'include stringified package file (use stdin instead)')
.option('--packageFile <filename>', 'package file location (default: ./package.json)')
.option('--pre <n>', 'Include -alpha, -beta, -rc. Default: 0. Default with --newest and --greatest: 1')
.option('--prefix <path>', 'Used as current working directory in bower and npm')
.option('-r, --registry <url>', 'specify third-party npm registry')
.option('--removeRange', 'remove version ranges from the final package version')
.option('-s, --silent', "don't output anything (--loglevel silent)")
Expand Down

0 comments on commit 789bc06

Please sign in to comment.