Skip to content

Commit 0395555

Browse files
committed
refactor: replace kolorist with kleur/colors
The size of `outfile.cjs` before the change: 143037 bytes Ater the change: 141514 bytes Saved 1523 bytes. I didn't choose `picocolors` despite it being more popular because it doesn't support tree-shaking and actually increases the bundle size a bit. I didn't choose `yoctocolors` because the resulting bundle is also a bit larger than the one produced by `kleur/colors`. Addressed the issue raised in #253
1 parent a958510 commit 0395555

File tree

4 files changed

+15
-29
lines changed

4 files changed

+15
-29
lines changed

LICENSE

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -299,34 +299,6 @@ Repository: git+https://github.com/lukeed/kleur.git
299299
> THE SOFTWARE.
300300
>
301301

302-
## kolorist
303-
304-
License: MIT
305-
By: Marvin Hagemeister
306-
Repository: git+https://github.com/marvinhagemeister/kolorist.git
307-
308-
> The MIT License (MIT)
309-
>
310-
> Copyright (c) 2020-present Marvin Hagemeister
311-
>
312-
> Permission is hereby granted, free of charge, to any person obtaining a copy
313-
> of this software and associated documentation files (the "Software"), to deal
314-
> in the Software without restriction, including without limitation the rights
315-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
316-
> copies of the Software, and to permit persons to whom the Software is
317-
> furnished to do so, subject to the following conditions:
318-
>
319-
> The above copyright notice and this permission notice shall be included in all
320-
> copies or substantial portions of the Software.
321-
>
322-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
323-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
324-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
325-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
326-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
327-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
328-
> SOFTWARE.
329-
330302
## prompts
331303

332304
License: MIT

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as path from 'node:path'
66
import { parseArgs } from 'node:util'
77

88
import prompts from 'prompts'
9-
import { red, green, bold } from 'kolorist'
9+
import { red, green, bold } from 'kleur/colors'
1010

1111
import ejs from 'ejs'
1212

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@
4747
"esbuild": "^0.24.0",
4848
"esbuild-plugin-license": "^1.2.3",
4949
"husky": "^9.1.6",
50+
"kleur": "^4.1.5",
5051
"kolorist": "^1.8.0",
5152
"lint-staged": "^15.2.10",
53+
"picocolors": "^1.1.0",
5254
"prettier": "^3.3.3",
5355
"prompts": "^2.4.2",
5456
"vitest": "^2.1.2",

pnpm-lock.yaml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)