Comparing version 0.0.2 to 0.0.3
34
index.js
@@ -6,6 +6,6 @@ | ||
var type = require('./lib/type') | ||
var type = require('./lib/type'); | ||
var exec = require('child_process').exec; | ||
var spawn = require('child_process').spawn; | ||
/** | ||
@@ -18,27 +18,21 @@ * Module exports. | ||
if (type(argvs[2]) == 'string') { | ||
exec('git add -A && git commit --message "'+argvs[2]+'"' | ||
, function (err,stdout,stderr){ | ||
if(err)throw err; | ||
//here we need to open buffers for stdout | ||
return; | ||
}); | ||
setImmediate(function(){ | ||
exec('git push', function (err,stdout,stderr){ | ||
if(err)throw err; | ||
return cb(null,stdout); | ||
console.log(stdout); | ||
var push = spawn('git',['push']); | ||
push.on('data',function(data){ | ||
//console.log(process); | ||
}); | ||
push.on('close',function(code){ | ||
console.log('success. pushed up to current remote branch') | ||
}); | ||
}); | ||
} | ||
} |
{ | ||
"name": "gito", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "git shortcuts", | ||
@@ -25,6 +25,7 @@ "main": "index.js", | ||
"devDependencies": { | ||
"supertest": "*", | ||
"connect": "*", | ||
"commander":"*", | ||
"mkdirp":"*", | ||
"mocha": "*", | ||
"should": "*" | ||
"should": "*", | ||
"supertest":"*" | ||
}, | ||
@@ -31,0 +32,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
4946
65
5
2