chalk/supports-color

How to force using colors from browser? #109

jcubic posted onGitHub

I want to use library that use chalk but in browser, to test my library that process ANSI escape codes. Is there a way other then environment variable so I can set it up and force ansi codes in browser?

I've tried this:

process.env.FORCE_COLOR = 3;
window.gradient = require('gradient-string');

but after build the file using browserify I don't have colors.


Chalk isn't meant to be used in the browser, nor is this package. It's explicitly intended for use with the standard I/O streams

posted by Qix- almost 5 years ago

Fund this Issue

$0.00
Funded

Pull requests