Skip to content

Commit

Permalink
Replace chalk with picocolors (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Dec 28, 2021
1 parent 45becae commit c65a478
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

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

error.messageFormatted = message;
error.messageOriginal = error.message;
Expand Down
26 changes: 18 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"index.js"
],
"dependencies": {
"chalk": "^4.1.2",
"lodash.clonedeep": "^4.5.0",
"picocolors": "^1.0.0",
"plugin-error": "^1.0.1",
"replace-ext": "^2.0.0",
"strip-ansi": "^6.0.1",
Expand Down

0 comments on commit c65a478

Please sign in to comment.