Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: re-export chalk #166

Closed
wants to merge 1 commit into from
Closed

feat: re-export chalk #166

wants to merge 1 commit into from

Conversation

antfu
Copy link
Member

@antfu antfu commented Mar 8, 2023

This allows users to construct custom colors without duplicating the color library.

@pi0
Copy link
Member

pi0 commented Mar 8, 2023

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 ?

@antfu
Copy link
Member Author

antfu commented Mar 8, 2023

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)

@pi0
Copy link
Member

pi0 commented Mar 8, 2023

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)

@pi0
Copy link
Member

pi0 commented Mar 8, 2023

Not that we need this perf but interesting :D

image

@ntnyq
Copy link

ntnyq commented Mar 9, 2023

https://github.com/sindresorhus/yoctocolors is much more smaller and better at perf, but it's ESM only.

@pi0
Copy link
Member

pi0 commented Mar 10, 2023

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 ❤️

@pi0 pi0 closed this Mar 10, 2023
@pi0 pi0 mentioned this pull request Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants