4 ms·
Is a codemod available for anyone who wants to migrate?
by feupan 5y ago
Is a codemod available for anyone who wants to migrate?
- junon 5y agoNot at the moment, but the migration should be pretty straightforward if you don't use the more elaborate color functions from `colors` (e.g. we don't have things like "zebra"). If you use `require('colors/safe')` and only use the basic colors, then Chalk is more or less a drop-in replacement. If you use the property values (e.g. `"my string".green`) then you'll need to change that to `chalk.green("my string")`.
- jwalton 5y agoOne thing worth noting is that chalk 5 is ESM only, so if you’re using commonjs, you’ll need to use chalk 4, or transpire it with Babel, or something…