Chalk works perfect for nearly all use cases we have and we make heavy use of testing for chalk.enabled to decide how we format our log output. This works in the local command line as expected and logs are printed colorfully.
Since we're switching from Atom to VSCode I've noticed that the color mode detection doesn't seem to work for the VSCode console. chalk reports supportsColor and enabled both being false. The VSCode Debug Console clearly supports colors and if I manually enforce chalk to use colors it works fine and as expected. But I wonder if this automatic detection is something that can be fixed?
This is what we use for detecting color support: https://github.com/chalk/supports-color I don't use VSCode, but you could look in supports-color where it's returning false for color support.
@sindresorhus can I pick this up? :)
Sure, go ahead :)
@sindresorhus @arabold fixed! albeit a little hacky
https://github.com/chalk/supports-color/pull/77
It is because vscode debugger is not a full terminal emulator
https://github.com/Microsoft/vscode/issues/3006#issuecomment-190664166
Most helpful comment
@sindresorhus can I pick this up? :)