trymodule icon indicating copy to clipboard operation
trymodule copied to clipboard

Reconsider using colors

Open victorb opened this issue 9 years ago • 6 comments

https://github.com/VictorBjelkholm/trymodule/blob/2030806d790213d426456959fdc7a69773a4c6f7/index.js#L5

You might want to reconsider using colors. It's a bad unmaintained module from a user-hostile author. Check out cli-colors or chalk instead.

From: https://github.com/sindresorhus/awesome-nodejs/pull/477#event-606502245

victorb avatar Mar 29 '16 14:03 victorb

Chalk FTW

dthree avatar Mar 29 '16 16:03 dthree

So, I've checked out both cli-color and chalk. Both seems good but introduces many dependencies compared to colors. One reason why colors have been my go-to module when it comes to colors in the terminal, is because of the simplicity and zero dependencies.

So unless someone else can recommend another zero dependency module instead of colors, I'll close this and live with colors.

victorb avatar Apr 01 '16 23:04 victorb

@VictorBjelkholm all of Chalk's deps are maintained by the same author, and are like 7kb or less. Not a biggie.

I would consider extending the String prototype a much more concerning proposition than a few tiny deps by the same (trusted) author.

dthree avatar Apr 02 '16 01:04 dthree

The network requests are the overhead really, and I would prefer to have a small number of tiny dependencies rather that a big number of them

Yeah, I'm not relying on any of the String prototype stuff that colors provide, although it does seem like I'm missusing it, and should use require('colors/safe') instead of just require('colors'). https://github.com/Marak/colors.js/blob/master/lib/index.js#L8

victorb avatar Apr 02 '16 02:04 victorb

Okay, cool. Up to you, man. But thats my two cents. :smile:

dthree avatar Apr 02 '16 02:04 dthree