-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from clinternet/integration
Allow integration with 3rd party code
- Loading branch information
Showing
4 changed files
with
75 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
#!/usr/bin/env node | ||
|
||
var main = require('../lib/npm-check-updates'); | ||
var program = require('commander'), | ||
main = require('../lib/npm-check-updates'); | ||
|
||
program | ||
.version(require('../package').version) | ||
.description('[filter] is a list or regex of package names to check (all others will be ignored).') | ||
.usage('[options] [filter]') | ||
.option('-d, --dev', 'check only devDependencies') | ||
.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, --force', 'force upgrade even when the latest version satisfies the declared semver dependency') | ||
.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('-j, --jsonAll', 'output new package.json instead of human-readable message') | ||
.option('--jsonUpgraded', 'output upgraded dependencies in json') | ||
.option('-p, --prod', 'check only dependencies (not devDependencies)') | ||
.option('-r, --registry <url>', 'specify third-party npm registry') | ||
.option('-s, --silent', "don't output anything") | ||
.option('-t, --greatest', "find the highest versions available instead of the latest stable versions") | ||
.option('-u, --upgrade', 'upgrade package.json dependencies to match latest versions (maintaining existing policy)') | ||
|
||
program.parse(process.argv); | ||
|
||
main.run(program); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters