mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-23 12:57:26 +08:00
bump version
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
|
||||
# Deployd
|
||||
|
||||
Plugin loader, MongoDB Object Document Mapper, and thin JSON server built on express.
|
||||
# Deployd
|
||||
## v0.1.0
|
||||
|
||||
Application stack built specifically for UI developers. Everything is available from client JavaScript.
|
||||
|
||||
Plugin loader, MongoDB Object Document Mapper, and thin JSON server built on express.
|
||||
|
||||
## Plugins
|
||||
|
||||
|
||||
16
bin/deployd
16
bin/deployd
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var spawn = require('child_process').spawn;
|
||||
|
||||
process.chdir(__dirname + '/../');
|
||||
|
||||
// TODO implement forever
|
||||
var d = spawn('node', ['index.js', process.argv[2], process.argv[3]]);
|
||||
|
||||
d.stderr.on('data', function(data) {
|
||||
console.log(data.toString());
|
||||
});
|
||||
|
||||
d.stdout.on('data', function(data) {
|
||||
console.log(data.toString());
|
||||
});
|
||||
45
lib/log.js
45
lib/log.js
@@ -2,6 +2,7 @@ var util = require('util')
|
||||
, prevLines = 0
|
||||
, prevTime = new Date().getTime();
|
||||
|
||||
|
||||
function time() {
|
||||
// the time since last log if longer than a while
|
||||
var result = ''
|
||||
@@ -51,27 +52,31 @@ function format(msg, method) {
|
||||
return result + '\n';
|
||||
}
|
||||
|
||||
['log', 'info', 'error', 'warn'].forEach(function(method) {
|
||||
var old = console[method];
|
||||
if(util.format) {
|
||||
|
||||
['log', 'info', 'error', 'warn'].forEach(function(method) {
|
||||
var old = console[method];
|
||||
|
||||
console[method] = module.exports[method] = function() {
|
||||
var msg = util.format.apply(this, arguments);
|
||||
console[method] = module.exports[method] = function() {
|
||||
var msg = util.format.apply(this, arguments);
|
||||
|
||||
if(method === 'error') {
|
||||
var err = new Error;
|
||||
err.name = 'Error';
|
||||
err.message = arguments[0];
|
||||
Error.captureStackTrace(err, arguments.callee);
|
||||
msg = err.stack;
|
||||
if(method === 'error') {
|
||||
var err = new Error;
|
||||
err.name = 'Error';
|
||||
err.message = arguments[0];
|
||||
Error.captureStackTrace(err, arguments.callee);
|
||||
msg = err.stack;
|
||||
}
|
||||
|
||||
// allow for a custom writer
|
||||
if(module.exports.writer) exports.writer(msg, method);
|
||||
|
||||
// format for readability
|
||||
msg = format(msg, method);
|
||||
|
||||
// output
|
||||
process.stdout.write(time() + msg);
|
||||
}
|
||||
});
|
||||
|
||||
// allow for a custom writer
|
||||
if(module.exports.writer) exports.writer(msg, method);
|
||||
|
||||
// format for readability
|
||||
msg = format(msg, method);
|
||||
|
||||
// output
|
||||
process.stdout.write(time() + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"author": "ritch",
|
||||
"name": "deployd",
|
||||
"version": "0.0.0",
|
||||
"version": "0.1.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/deployd/deployd.git"
|
||||
@@ -16,8 +16,5 @@
|
||||
"mongodb": ">= 0.9.0",
|
||||
"ejs": ">= 0.4.3"
|
||||
},
|
||||
"bin":{
|
||||
"deployd":"./bin/deployd"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
Reference in New Issue
Block a user