Skip to content

Commit 5748c33

Browse files
committed
1 parent 9dd4aef commit 5748c33

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var CoreObject = require('core-object');
22
var chalk = require('chalk');
3-
var blue = chalk.blue;
3+
var _ = require('lodash-node');
44

55
var DeployPluginBase = CoreObject.extend({
66
context: null,
@@ -55,23 +55,24 @@ var DeployPluginBase = CoreObject.extend({
5555
},
5656

5757
log: function(message, opts) {
58-
opts = opts || { color: 'blue' };
59-
opts.color = opts.color || 'blue';
58+
opts = opts || {};
6059
var ui = this.ui;
60+
var color = opts.color || ui.logInfoColor || 'blue';
61+
var chalkColor = chalk[color];
62+
6163
// the following accomodates a spelling error in ember-cli
6264
var actualStream = ui.actualOutputStream || ui.actualOuputStream;
6365

6466
if (!opts.verbose || (opts.verbose && ui.verbose)) {
6567
if (ui.verbose) {
66-
ui.write(blue('| '));
68+
ui.write(chalkColor('| '));
6769
} else if (actualStream && actualStream.cursorTo) {
6870
// on a real terminal we want to reset the cursor position
6971
// to avoid overlap with other outputs
7072
actualStream.clearLine();
7173
actualStream.cursorTo(0);
7274
}
7375

74-
var chalkColor = chalk[opts.color];
7576
this.logRaw(chalkColor('- ' + message));
7677
}
7778
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
},
99
"author": "Luke Melia and ember-cli-deploy team",
1010
"license": "MIT",
11-
"devDependencies": {
12-
},
11+
"devDependencies": {},
1312
"dependencies": {
1413
"chalk": "^1.0.0",
15-
"core-object": "0.0.2"
14+
"core-object": "0.0.2",
15+
"lodash": "^4.6.1"
1616
}
1717
}

0 commit comments

Comments
 (0)