Skip to content

Commit c65a478

Browse files
authored
Replace chalk with picocolors (#833)
1 parent 45becae commit c65a478

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const path = require('path');
4-
const chalk = require('chalk');
4+
const picocolors = require('picocolors');
55
const PluginError = require('plugin-error');
66
const replaceExtension = require('replace-ext');
77
const stripAnsi = require('strip-ansi');
@@ -69,7 +69,7 @@ const filePush = (file, sassObject, callback) => {
6969
const handleError = (error, file, callback) => {
7070
const filePath = (error.file === 'stdin' ? file.path : error.file) || file.path;
7171
const relativePath = path.relative(process.cwd(), filePath);
72-
const message = [chalk.underline(relativePath), error.formatted].join('\n');
72+
const message = `${picocolors.underline(relativePath)}\n${error.formatted}`;
7373

7474
error.messageFormatted = message;
7575
error.messageOriginal = error.message;

package-lock.json

+18-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"index.js"
3232
],
3333
"dependencies": {
34-
"chalk": "^4.1.2",
3534
"lodash.clonedeep": "^4.5.0",
35+
"picocolors": "^1.0.0",
3636
"plugin-error": "^1.0.1",
3737
"replace-ext": "^2.0.0",
3838
"strip-ansi": "^6.0.1",

0 commit comments

Comments
 (0)