paint warning and error log messages
This commit is contained in:
parent
52c88e5f43
commit
7308d7be94
@ -1,5 +1,6 @@
|
||||
import Progress from 'progress';
|
||||
import assert from 'assert';
|
||||
import chalk from 'chalk';
|
||||
|
||||
class Log {
|
||||
info (text) {
|
||||
@ -7,11 +8,12 @@ class Log {
|
||||
}
|
||||
|
||||
warn (text) {
|
||||
console.log('> ' + text); // TODO warn?
|
||||
console.log(`> ${chalk.blue('WARN')} ${text}`);
|
||||
}
|
||||
|
||||
error (text) {
|
||||
console.log('> ' + text); // TODO error?
|
||||
if (text.message) text = text.message;
|
||||
console.log(`> ${chalk.red('ERR!')} ${text}`);
|
||||
}
|
||||
|
||||
enableProgress (text) {
|
||||
|
||||
@ -17,10 +17,11 @@
|
||||
"dependencies": {
|
||||
"babel-runtime": "6.11.6",
|
||||
"byline": "5.0.0",
|
||||
"chalk": "^1.1.3",
|
||||
"expand-template": "1.0.2",
|
||||
"fs-promise": "0.5.0",
|
||||
"progress": "1.1.8",
|
||||
"minimist": "1.2.0",
|
||||
"progress": "1.1.8",
|
||||
"request": "2.74.0",
|
||||
"request-progress": "2.0.1",
|
||||
"semver": "5.3.0",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user