base-runtimes
Advanced tools
Comparing version 0.1.5 to 0.1.6
32
index.js
@@ -15,3 +15,3 @@ /*! | ||
return function plugin(app) { | ||
return function baseRuntimes(app) { | ||
if (!isValidInstance(app)) return; | ||
@@ -49,14 +49,5 @@ var time = new utils.Time(); | ||
this.once('done', function() { | ||
utils.timestamp('finished', utils.green(utils.check)); | ||
utils.timestamp('finished', utils.log.success); | ||
}); | ||
function silent(app, task) { | ||
if (app.options.silent === true) { | ||
return true; | ||
} | ||
if (task && task.options.silent === true) { | ||
return true; | ||
} | ||
} | ||
function starting(namespace, name) { | ||
@@ -71,5 +62,14 @@ var key = toKey(namespace, name); | ||
var prefix = key ? key + ' ' : ''; | ||
utils.timestamp('finished', prefix + utils.magenta(time.end(key))); | ||
utils.timestamp('finished', prefix + utils.colors.magenta(time.end(key))); | ||
} | ||
function silent(app, task) { | ||
if (app.options.silent === true) { | ||
return true; | ||
} | ||
if (task && task.options.silent === true) { | ||
return true; | ||
} | ||
} | ||
function name(task) { | ||
@@ -89,9 +89,9 @@ return task.name || ''; | ||
if (namespace && name) { | ||
res = utils.bold(utils.cyan(namespace)) + ':' + utils.yellow(name); | ||
res = utils.bold(utils.colors.cyan(namespace)) + ':' + utils.colors.yellow(name); | ||
} else if (namespace) { | ||
res = utils.bold(utils.cyan(namespace)); | ||
res = utils.bold(utils.colors.cyan(namespace)); | ||
} else if (name) { | ||
res = utils.cyan(name); | ||
res = utils.colors.cyan(name); | ||
} | ||
@@ -101,3 +101,3 @@ return res; | ||
return plugin; | ||
return baseRuntimes; | ||
}; | ||
@@ -104,0 +104,0 @@ }; |
{ | ||
"name": "base-runtimes", | ||
"description": "Plugin for adding composer-runtimes to base applications, complementing the base-tasks and base-generators plugins.", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"homepage": "https://github.com/node-base/base-runtimes", | ||
@@ -24,18 +24,12 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"dependencies": { | ||
"ansi-bold": "^0.1.1", | ||
"ansi-cyan": "^0.1.1", | ||
"ansi-green": "^0.1.1", | ||
"ansi-magenta": "^0.1.1", | ||
"ansi-yellow": "^0.1.1", | ||
"extend-shallow": "^2.0.1", | ||
"fancy-log": "^1.2.0", | ||
"lazy-cache": "^1.0.3", | ||
"success-symbol": "^0.1.0", | ||
"log-utils": "^0.1.0", | ||
"time-diff": "^0.1.0" | ||
}, | ||
"devDependencies": { | ||
"base": "^0.6.7", | ||
"base-tasks": "^0.3.0", | ||
"gulp-format-md": "*", | ||
"mocha": "^2.4.2" | ||
"base": "^0.8.1", | ||
"base-task": "^0.4.3", | ||
"gulp-format-md": "^0.1.8", | ||
"mocha": "^2.4.5" | ||
}, | ||
@@ -42,0 +36,0 @@ "keywords": [ |
24
utils.js
@@ -16,9 +16,3 @@ 'use strict'; | ||
require('extend-shallow', 'extend'); | ||
require('ansi-bold', 'bold'); | ||
require('ansi-cyan', 'cyan'); | ||
require('ansi-green', 'green'); | ||
require('ansi-magenta', 'magenta'); | ||
require('ansi-yellow', 'yellow'); | ||
require('fancy-log', 'timestamp'); | ||
require('success-symbol', 'check'); | ||
require('log-utils', 'log'); | ||
require('time-diff', 'Time'); | ||
@@ -28,2 +22,18 @@ require = fn; | ||
/** | ||
* Expose `colors` from log-utils | ||
*/ | ||
utils.colors = utils.log.colors; | ||
/** | ||
* Formatted timestamp | ||
*/ | ||
utils.timestamp = function() { | ||
var args = [].slice.call(arguments); | ||
args.unshift(utils.log.timestamp); | ||
console.error.apply(console, args); | ||
}; | ||
/** | ||
* Expose `utils` modules | ||
@@ -30,0 +40,0 @@ */ |
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
10264
4
130
+ Addedlog-utils@^0.1.0
+ Addedansi-bgblack@0.1.1(transitive)
+ Addedansi-bgblue@0.1.1(transitive)
+ Addedansi-bgcyan@0.1.1(transitive)
+ Addedansi-bggreen@0.1.1(transitive)
+ Addedansi-bgmagenta@0.1.1(transitive)
+ Addedansi-bgred@0.1.1(transitive)
+ Addedansi-bgwhite@0.1.1(transitive)
+ Addedansi-bgyellow@0.1.1(transitive)
+ Addedansi-black@0.1.1(transitive)
+ Addedansi-blue@0.1.1(transitive)
+ Addedansi-colors@0.1.0(transitive)
+ Addedansi-dim@0.1.1(transitive)
+ Addedansi-grey@0.1.1(transitive)
+ Addedansi-hidden@0.1.1(transitive)
+ Addedansi-inverse@0.1.1(transitive)
+ Addedansi-italic@0.1.1(transitive)
+ Addedansi-reset@0.1.1(transitive)
+ Addedansi-strikethrough@0.1.1(transitive)
+ Addedansi-underline@0.1.1(transitive)
+ Addedansi-white@0.1.1(transitive)
+ Addederror-symbol@0.1.0(transitive)
+ Addedinfo-symbol@0.1.0(transitive)
+ Addedlazy-cache@0.2.7(transitive)
+ Addedlog-ok@0.1.1(transitive)
+ Addedlog-utils@0.1.5(transitive)
+ Addedwarning-symbol@0.1.0(transitive)
- Removedansi-bold@^0.1.1
- Removedansi-cyan@^0.1.1
- Removedansi-green@^0.1.1
- Removedansi-magenta@^0.1.1
- Removedansi-yellow@^0.1.1
- Removedfancy-log@^1.2.0
- Removedsuccess-symbol@^0.1.0
- Removedcolor-support@1.1.3(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedparse-node-version@1.0.1(transitive)