dyetty/README.md

16 lines
964 B
Markdown
Raw Permalink Normal View History

2023-07-28 12:25:32 +01:00
# dyetty   [![CodeFactor](https://www.codefactor.io/repository/github/tgpholly/dyetty/badge)](https://www.codefactor.io/repository/github/tgpholly/dyetty)   [![Node.js CI](https://github.com/tgpholly/dyetty/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/tgpholly/dyetty/actions/workflows/node.js.yml)   [![npm](https://img.shields.io/npm/v/dyetty)](https://www.npmjs.com/package/dyetty)
A drop-in, function compatible alternative to chalk that supports CommonJS
2023-08-01 14:05:33 +01:00
## Motivations
2023-08-01 14:07:02 +01:00
When version 5 of chalk was released support for CommonJS was dropped. I don't yet (if ever) want to migrate to ESM and was frustrated that I had to use `chalk@4` so I made this as a result of that frustration.
2023-08-01 14:05:33 +01:00
## Things to note
When using TypeScript you may need to change the way you import the module if you import chalk like this:
```ts
import chalk from "chalk";
```
To importing it like this:
```ts
import * as chalk from "dyetty";
```