-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add chalk to preferred manifest (#188)
Adds `chalk` and `cli-color` to the preferred manifest and documents alternatives. Closes #149 --------- Co-authored-by: Superchupu <[email protected]> Co-authored-by: Ben McCann <[email protected]>
- Loading branch information
1 parent
5560f17
commit 4d372d0
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# chalk | ||
|
||
`chalk`, `cli-color`, and similar libraries have various alternatives which are lighter and faster. | ||
|
||
# Alternatives | ||
|
||
## picocolors | ||
|
||
A widely used alternative which is much lighter and faster. | ||
|
||
[Project Page](https://github.com/alexeyraspopov/picocolors) | ||
|
||
[npm](https://npmjs.com/package/picocolors) | ||
|
||
## ansis | ||
|
||
A lighter alternative which also supports 256 color creation. | ||
|
||
[Project Page](https://github.com/webdiscus/ansis) | ||
|
||
[npm](https://npmjs.com/package/ansis) | ||
|
||
## styleText (Node 20.x and above) | ||
|
||
Node itself has a `styleText` function in the built-in `util` library. | ||
|
||
You can use it like so: | ||
|
||
```js | ||
import { styleText } from 'node:util'; | ||
|
||
styleText('green', 'Success!') | ||
``` | ||
|
||
[Project Page](https://nodejs.org/api/util.html#utilstyletextformat-text-options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters