victorb / trymodule

➰ It's never been easier to try nodejs modules!
1.14k stars 29 forks source link

Reconsider using colors #16

Open victorb opened 8 years ago

victorb commented 8 years ago

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

dthree commented 8 years ago

Chalk FTW

victorb commented 8 years ago

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.

dthree commented 8 years ago

@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.

victorb commented 8 years ago

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

dthree commented 8 years ago

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