From 6624d481accfca5b4bb11d9621b80531a406d5bd Mon Sep 17 00:00:00 2001 From: Christian-Alexander Hoffmann Date: Mon, 22 Jul 2019 10:44:30 +0200 Subject: [PATCH 1/2] disabled colorization when called with --files option, added documentation --- README.md | 1 + bin/license-checker | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7247eaa..d4dbb70 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Options * `--csv` output in csv format. * `--csvComponentPrefix` prefix column for component in csv format. * `--out [filepath]` write the data to a specific file. +* `--files [path]` copy all license files to path and rename them to `module-name`@`version`-LICENSE.txt. * `--customPath` to add a custom Format file in JSON * `--exclude [list]` exclude modules which licenses are in the comma-separated list from the output * `--relativeLicensePath` output the location of the license files as relative paths diff --git a/bin/license-checker b/bin/license-checker index 2704616..fcec911 100755 --- a/bin/license-checker +++ b/bin/license-checker @@ -27,6 +27,7 @@ if (args.help) { ' --csv output in csv format.', ' --csvComponentPrefix column prefix for components in csv file', ' --out [filepath] write the data to a specific file.', + ' --files [path] copy all license files to path and rename them to @-LICENSE.txt.' ' --customPath to add a custom Format file in JSON', ' --exclude [list] exclude modules which licenses are in the comma-separated list from the output', ' --relativeLicensePath output the location of the license files as relative paths', @@ -105,5 +106,5 @@ checker.init(args, function(err, json) { }); function shouldColorizeOutput(args) { - return args.color && !args.out && !(args.csv || args.json || args.markdown); + return args.color && !args.out && !(args.csv || args.json || args.markdown || args.files); } From c341c3d732c54041f5f54c9867d9dde23b5188c8 Mon Sep 17 00:00:00 2001 From: Christian-Alexander Hoffmann Date: Mon, 22 Jul 2019 14:03:15 +0200 Subject: [PATCH 2/2] fixed missing comma in usage string, reworked boolean expression --- bin/license-checker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/license-checker b/bin/license-checker index fcec911..ae8cd32 100755 --- a/bin/license-checker +++ b/bin/license-checker @@ -27,7 +27,7 @@ if (args.help) { ' --csv output in csv format.', ' --csvComponentPrefix column prefix for components in csv file', ' --out [filepath] write the data to a specific file.', - ' --files [path] copy all license files to path and rename them to @-LICENSE.txt.' + ' --files [path] copy all license files to path and rename them to @-LICENSE.txt.', ' --customPath to add a custom Format file in JSON', ' --exclude [list] exclude modules which licenses are in the comma-separated list from the output', ' --relativeLicensePath output the location of the license files as relative paths', @@ -106,5 +106,5 @@ checker.init(args, function(err, json) { }); function shouldColorizeOutput(args) { - return args.color && !args.out && !(args.csv || args.json || args.markdown || args.files); + return args.color && !args.out && !args.files && !(args.csv || args.json || args.markdown); }