jeroenouw / liftr-tscov

Check the type coverage of any TypeScript project with this easy npm package
https://www.npmjs.com/package/@liftr/tscov
MIT License
30 stars 5 forks source link

Don't output colors when in a environment where they aren't supported #11

Closed koddsson closed 5 years ago

koddsson commented 5 years ago

Not all terminals can output colored text resulting in some weird formatting for colored output.

This PR auto detects color support based on the environment and makes sure to not include color formatting when it's not supported.

Ref: https://github.com/lukeed/kleur#conditional-support Ref: https://www.npmjs.com/package/color-support

jeroenouw commented 5 years ago

Nice!