Comparing version 0.0.4 to 0.0.7
35
index.js
@@ -11,6 +11,5 @@ /** | ||
var colors = require('chalk'); | ||
var chalk = require('chalk'); | ||
/** | ||
@@ -25,5 +24,5 @@ * General log | ||
var args = Array.prototype.map.call(arguments, function (arg) { | ||
return colors.stripColor(arg); | ||
return chalk.stripColor(arg); | ||
}); | ||
args[0] = colors.bold(args[0]); | ||
args[0] = chalk.bold(args[0]); | ||
return console.log.apply(this, args); | ||
@@ -61,3 +60,3 @@ }; | ||
var time = new Date().toLocaleTimeString(); | ||
return colors.bgBlack.white(time) + ' '; | ||
return chalk.bgBlack.white(time) + ' '; | ||
}; | ||
@@ -74,3 +73,3 @@ | ||
var format = function(color, text) { | ||
return colors[color](' ' + log.runner + ' [' + text + '] ·'); | ||
return chalk[color](' ' + log.runner + ' [' + text + '] ·'); | ||
}; | ||
@@ -88,3 +87,3 @@ | ||
var args = arguments; | ||
args[0] = verb.utils.time() + colors.gray(args[0]); | ||
args[0] = verb.utils.time() + chalk.gray(args[0]); | ||
return console.log.apply(this, args); | ||
@@ -149,3 +148,3 @@ }; | ||
var args = arguments; | ||
args[0] = colors.bold(args[0]); | ||
args[0] = chalk.bold(args[0]); | ||
return console.log.apply(this, args); | ||
@@ -163,3 +162,3 @@ }; | ||
var args = arguments; | ||
args[0] = colors.cyan(args[0]); | ||
args[0] = chalk.cyan(args[0]); | ||
return console.log.apply(this, args); | ||
@@ -177,3 +176,3 @@ }; | ||
var args = arguments; | ||
args[0] = colors.green(args[0]); | ||
args[0] = chalk.green(args[0]); | ||
return console.log.apply(this, args); | ||
@@ -192,3 +191,3 @@ }; | ||
var args = arguments; | ||
args[0] = (colors.green(' ' + verb.runner.name + ' [' + args[0] + ']')); | ||
args[0] = (chalk.green(' ' + verb.runner.name + ' [' + args[0] + ']')); | ||
return console.log.apply(this, args); | ||
@@ -207,3 +206,3 @@ }; | ||
var args = arguments; | ||
args[0] = colors.yellow(args[0]); | ||
args[0] = chalk.yellow(args[0]); | ||
return console.warn.apply(this, args); | ||
@@ -222,3 +221,3 @@ }; | ||
var args = arguments; | ||
args[0] = colors.red(args[0]); | ||
args[0] = chalk.red(args[0]); | ||
return console.error.apply(this, args); | ||
@@ -237,3 +236,3 @@ }; | ||
var args = arguments; | ||
args[0] = (colors.red(' ' + log.runner + ' [FAIL]:') + colors.gray(' · ') + args[0]); | ||
args[0] = (chalk.red(' ' + log.runner + ' [FAIL]:') + chalk.gray(' · ') + args[0]); | ||
console.log(); | ||
@@ -246,2 +245,9 @@ console.log.apply(this, args); | ||
/** | ||
* Expose chalk | ||
*/ | ||
log.color = chalk; | ||
/** | ||
* Expose all properties on the `log` object | ||
@@ -264,2 +270,3 @@ * to `verbose` mode. | ||
module.exports = log; |
{ | ||
"name": "verbalize", | ||
"version": "0.0.7", | ||
"description": "A lightweight command line logging utility, with verbose mode and colors by chalk.", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/jonschlinkert/verbalize", | ||
"author": { | ||
@@ -10,2 +9,9 @@ "name": "Jon Schlinkert", | ||
}, | ||
"homepage": "https://github.com/jonschlinkert/verbalize", | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/verbalize/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"repository": { | ||
@@ -18,19 +24,27 @@ "type": "git", | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/jonschlinkert/verbalize/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"scripts": { | ||
"test": "mocha --R spec" | ||
}, | ||
"dependencies": { | ||
"chalk": "~0.4.0", | ||
"minimist": "0.0.8" | ||
"extend": "~1.2.1" | ||
}, | ||
"devDependencies": { | ||
"verb": "~0.1.20" | ||
} | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0", | ||
"npm": ">=1.2.10" | ||
}, | ||
"keywords": [ | ||
"logging", | ||
"log", | ||
"logger", | ||
"terminal", | ||
"command", | ||
"message", | ||
"messages", | ||
"command line" | ||
] | ||
} |
@@ -20,3 +20,3 @@ # verbalize [![NPM version](https://badge.fury.io/js/verbalize.png)](http://badge.fury.io/js/verbalize) | ||
## License | ||
Copyright (c) 2014 <%= authorName %>, contributors. | ||
Copyright (c) 2014 Jon Schlinkert, contributors. | ||
Released under the MIT license | ||
@@ -23,0 +23,0 @@ |
@@ -17,2 +17,4 @@ var log = require('../'); | ||
log.magenta('foo'); | ||
log('This is a message'); | ||
@@ -19,0 +21,0 @@ log.bold('This is a bold message'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
234
8703
10
+ Addedextend@~1.2.1
+ Addedextend@1.2.1(transitive)
- Removedminimist@0.0.8
- Removedminimist@0.0.8(transitive)