Skip to content

Commit

Permalink
feat: allow restricting output to specified packages
Browse files Browse the repository at this point in the history
  • Loading branch information
codepunkt committed Jul 19, 2018
1 parent 5f63f87 commit 0f53922
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 121 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Options
* `--summary` output a summary of the license usage',
* `--failOn [list]` fail (exit with code 1) on the first occurrence of the licenses of the semicolon-separated list
* `--onlyAllow [list]` fail (exit with code 1) on the first occurrence of the licenses not in the semicolon-seperated list
* `--packages [list]` restrict output to the packages (package@version) in the semicolon-seperated list

Exclusions
----------
Expand All @@ -102,6 +103,7 @@ license-checker --csv --out /path/to/licenses.csv
license-checker --unknown
license-checker --customPath customFormatExample.json
license-checker --exclude 'MIT, MIT OR X11, BSD, ISC'
license-checker --packages 'react@16.3.0;react-dom@16.3.0;lodash@4.3.1'
license-checker --onlyunknown
```

Expand Down
1 change: 1 addition & 0 deletions bin/license-checker
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if (args.help) {
' --summary output a summary of the license usage',
' --failOn [list] fail (exit with code 1) on the first occurrence of the licenses of the semicolon-separated list',
' --onlyAllow [list] fail (exit with code 1) on the first occurrence of the licenses not in the semicolon-seperated list',
' --packages [list] restrict output to the packages (package@version) in the semicolon-seperated list',
'',
' --version The current version',
' --help The text you are reading right now :)',
Expand Down
3 changes: 2 additions & 1 deletion lib/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ var nopt = require('nopt'),
files: require('path'),
summary: Boolean,
failOn: String,
onlyAllow: String
onlyAllow: String,
packages: String
},
shorts = {
"v": ["--version"],
Expand Down
Loading

0 comments on commit 0f53922

Please sign in to comment.