Skip to content

Commit 8d3594e

Browse files
jonschlinkertphated
authored andcommitted
Update: Reduce size by removing chalk
1 parent 6ebdac3 commit 8d3594e

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

index.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*/
77

88
var util = require('util');
9-
var chalk = require('chalk');
9+
var red = require('ansi-red');
10+
var cyan = require('ansi-cyan');
1011
var extend = require('extend-shallow');
1112
var differ = require('arr-diff');
1213
var union = require('arr-union');
@@ -135,9 +136,9 @@ PluginError.prototype.toString = function () {
135136

136137
// format the output message
137138
function message(msg, thisArg) {
138-
var sig = chalk.red(thisArg.name);
139+
var sig = red(thisArg.name);
139140
sig += ' in plugin ';
140-
sig += '"' + chalk.cyan(thisArg.plugin) + '"';
141+
sig += '"' + cyan(thisArg.plugin) + '"';
141142
sig += '\n';
142143
sig += msg;
143144
return sig;

package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "plugin-error",
33
"description": "Error handling for vinyl plugins. Just an abstraction of what's in gulp-util with minor changes.",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"homepage": "https://github.com/jonschlinkert/plugin-error",
66
"author": {
77
"name": "Jon Schlinkert",
@@ -14,10 +14,7 @@
1414
"bugs": {
1515
"url": "https://github.com/jonschlinkert/plugin-error/issues"
1616
},
17-
"license": {
18-
"type": "MIT",
19-
"url": "https://github.com/jonschlinkert/plugin-error/blob/master/LICENSE"
20-
},
17+
"license": "MIT",
2118
"files": [
2219
"index.js"
2320
],
@@ -29,13 +26,18 @@
2926
"test": "mocha"
3027
},
3128
"dependencies": {
29+
"ansi-cyan": "^0.1.1",
30+
"ansi-red": "^0.1.1",
3231
"arr-diff": "^1.0.1",
3332
"arr-union": "^2.0.1",
34-
"chalk": "^1.0.0",
3533
"extend-shallow": "^1.1.2"
3634
},
3735
"devDependencies": {
3836
"mocha": "*",
3937
"should": "*"
40-
}
38+
},
39+
"keywords": [
40+
"error",
41+
"plugin"
42+
]
4143
}

0 commit comments

Comments
 (0)