npmlog icon indicating copy to clipboard operation
npmlog copied to clipboard

[FEATURE] Disable log colors if environment variable is set

Open akatran opened this issue 3 years ago • 3 comments

Using the npmlog within IDEs like Eclipse or other tools that does not support colors, the outcome show instead of colors, the special characters equivalents.

This is an example using the node-gyp package that uses npmlog for logging. image

If someone set a environment variable could this prevent the colors from being displayed?

Node.js already has a environment variable for disabling colors but npmlog does not seems to respect it. That is NODE_DISABLE_COLORS

Could use the same environment variable or define a new one, doesn't matter.

akatran avatar Jul 17 '21 19:07 akatran

Looks like it is similar to #35 and #6 but this depends on environment variable and not on a setting.

akatran avatar Jul 17 '21 19:07 akatran

Node.js already has a environment variable for disabling colors but npmlog does not seems to respect it.

NO_COLOR is also supported by Node.js, but additionally it’s a little more standardized.

addaleax avatar Jul 18 '21 13:07 addaleax

its till available ? I'm interested to work on.

AugustinMauroy avatar Sep 17 '23 21:09 AugustinMauroy