mwittig / npm-license-crawler

Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
BSD 3-Clause "New" or "Revised" License
233 stars 45 forks source link

Colorize the output #30

Closed erogleva closed 5 years ago

erogleva commented 5 years ago

license-checker colorizes the name and version of the dependencies when printing the output to the terminal, which makes it slightly better readable. So I thought that it would maybe be a good idea to do the same here :)

mwittig commented 5 years ago

Thank you very much for your contribution! Colorized output is definitely an improvement if it is display console. However, as some users may redirect the output, the output may contain disturbing control codes in the case. I am not sure whether chalk auto-detection can cover all cases. I'll need to have a look at this. Apart from this, the "--no-color" option should be documented as some user may not be aware of this

erogleva commented 5 years ago

Thank you for your feedback! I have added and documented the noColor option. As for the redirection, it really seems that it doesn't work in all cases with the colors, I will look again into this too.

mwittig commented 5 years ago

Excellent. Note, however, the chalk has a built-in handling for 'no-color' as far as I know. Well, I need to test this myself. Let me sort this out for and I keep you posted here.

See also https://www.npmjs.com/package/chalk#chalksupportscolor

erogleva commented 5 years ago

Ah okay, thanks, I hadn't seen this! I've now removed the additional option.

mwittig commented 5 years ago

Excellent. Thanks again for your contribution. Much appreciated!