Comparing version 1.0.23 to 1.0.24
40
index.js
@@ -36,39 +36,17 @@ var async = require('async'); | ||
function questions() { | ||
module.exports = function run() { | ||
return new Promise(function(resolve, reject) { | ||
q(content) | ||
.then((value) => { | ||
resolve(output.url) | ||
}) | ||
.catch((err) => {reject(err);}) | ||
}); | ||
} | ||
function check() { | ||
return new Promise(function(resolve, reject) { | ||
B() | ||
.then((value) => {console.log(colors.red('Git already initialized.'));}) | ||
.catch((err) => { | ||
questions() | ||
.then((url) => { | ||
E(`git init && git remote add origin ${url.trim()}`) | ||
.then((value) => { | ||
resolve('Git init successfully.') | ||
}) | ||
.catch((err) => {reject(err)}) | ||
q(content) | ||
.then((value) => { | ||
E(`git init && git remote add origin ${value.url.trim()}`) | ||
.then((value) => { | ||
resolve('Git init successfully.') | ||
}) | ||
}) | ||
.catch((err) => {reject(err);}) | ||
}) | ||
}) | ||
}) | ||
} | ||
module.exports = function run() { | ||
return new Promise(function(resolve, reject) { | ||
check() | ||
.then((value) => { | ||
resolve(value) | ||
}) | ||
.catch((err) => { | ||
reject(err) | ||
}) | ||
}) | ||
} |
{ | ||
"name": "1n1t", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "Create github repository in programmatically.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5
2382
52