pwmetrics icon indicating copy to clipboard operation
pwmetrics copied to clipboard

Consider chalk

Open denar90 opened this issue 7 years ago • 6 comments

We are using our own stuff for coloring console output, maybe we should also think about https://github.com/chalk/chalk

wdyt?

denar90 avatar Mar 10 '18 20:03 denar90

Works for me

paulirish avatar Mar 10 '18 22:03 paulirish

Is there any advantage to using chalk?

pedro93 avatar Mar 10 '18 22:03 pedro93

Just for tuning our code and have ability to use colored output with better API

denar90 avatar Mar 12 '18 20:03 denar90

What about wunderbar? @gribnoysup already submitted a PR https://github.com/paulirish/pwmetrics/pull/161 and it looks quite nice. Given that this issue was to consider chalk for code clean up and enabled colored output I think we have a nice alternative.

pedro93 avatar Mar 24 '18 17:03 pedro93

cc @paulirish

denar90 avatar Mar 24 '18 20:03 denar90

@pedro93 @denar90 as my PR was mentioned, I decided that I'll add my two cents to the discussion 😸

Wunderbar could replace your forked chart drawing library cli-charts. But in your codebase, I see that these colorify functions are used mainly for logging, and not for charts (currently in the forked cli-charts implementation charm library is responsible for coloring chart bars). So considering chalk seems like a topic not connected directly to Wunderbar.

That said, If you decide to go with Wunderbar, switching your custom colorify functions to chalk makes a lot of sense. Wunderbar uses chalk and that means that chalk will already be in your bundle, so why not use it? 😄

gribnoysup avatar Mar 25 '18 18:03 gribnoysup