Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base-runtimes

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-runtimes - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

utils.js

64

index.js

@@ -10,16 +10,62 @@ /*!

var utils = require('./utils');
module.exports = function(options) {
var runtimes = require('composer-runtimes');
return function(app) {
if (this.isRegistered('base-runtimes')) return;
this.use(runtimes({
displayName: function(key) {
if (typeof app.generator === 'function' && app.name !== key) {
return app.name + ':' + key;
}
return key;
var time = new utils.Time();
this.on('starting', function(build) {
starting(namespace(build));
});
this.on('finished', function(build) {
finished(namespace(build));
});
this.on('task:starting', function(task) {
starting(namespace(app), name(task));
});
this.on('task:finished', function(task) {
finished(namespace(app), name(task));
});
this.once('done', function() {
console.error(utils.green(utils.check), 'finished');
});
function starting(namespace, name) {
var key = toKey(namespace, name);
time.start(key);
utils.timestamp('starting', key);
}
function finished(namespace, name) {
var key = toKey(namespace, name);
var prefix = key ? key + ' ' : '';
utils.timestamp('finished', prefix + utils.magenta(time.end(key)));
}
function name(app) {
return app.name || '';
}
function namespace(app) {
return app.namespace || '';
}
function toKey(namespace, name) {
if (namespace && name) {
return utils.cyan(namespace + ':' + name);
}
}));
if (namespace) {
return utils.cyan(namespace);
}
if (name) {
return utils.cyan(name);
}
return '';
}
};
};

15

package.json
{
"name": "base-runtimes",
"description": "Plugin for adding composer-runtimes to base applications, complementing the base-tasks and base-generators plugins.",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/jonschlinkert/base-runtimes",

@@ -13,3 +13,4 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"files": [
"index.js"
"index.js",
"utils.js"
],

@@ -24,7 +25,13 @@ "main": "index.js",

"dependencies": {
"composer-runtimes": "^0.7.0"
"ansi-cyan": "^0.1.1",
"ansi-green": "^0.1.1",
"ansi-magenta": "^0.1.1",
"fancy-log": "github:jonschlinkert/fancy-log#timestamp",
"lazy-cache": "^1.0.3",
"success-symbol": "^0.1.0",
"time-diff": "^0.1.0"
},
"devDependencies": {
"base": "^0.6.7",
"base-tasks": "^0.1.4",
"base-tasks": "^0.3.0",
"gulp-format-md": "*",

@@ -31,0 +38,0 @@ "mocha": "^2.4.2"

@@ -77,2 +77,2 @@ # base-runtimes [![NPM version](https://img.shields.io/npm/v/base-runtimes.svg)](https://www.npmjs.com/package/base-runtimes) [![Build Status](https://img.shields.io/travis/jonschlinkert/base-runtimes.svg)](https://travis-ci.org/jonschlinkert/base-runtimes)

_This file was generated by [verb](https://github.com/verbose/verb) on January 27, 2016._
_This file was generated by [verb](https://github.com/verbose/verb) on January 29, 2016._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc