Closed antfu closed 1 year ago
This is nice idea if we keep using chalk but since consola is also likely to drop it, it can introduce more breaking changes.
Have you tried https://github.com/jorgebucaran/colorette ?
For sure!
We use picocolors all over the Vite ecosystem. If I recall correctly, it is the faster one. But I am also open for other choices (any of them would work perfectly tbh, no much opinions)
I chose colorette mainly because it is tree-shakable and looking at code, super small and thinking to use it across unjs projects (including citty but probably also next major version of consola)
Not that we need this perf but interesting :D
https://github.com/sindresorhus/yoctocolors is much more smaller and better at perf, but it's ESM only.
Thanks for referencing. Yes that seems good too but more stricter (in unjs ecosystem we keep supporting CJS as much as possible).
I think for now it is best to not reexport chalk from consola and start advocating / using colorette for cases like nuxt. Seems most promising option for me atm.
Thanks for PR idea anyway @antfu ❤️
This allows users to construct custom colors without duplicating the color library.