Comparing version 1.0.12 to 1.0.13
40
index.js
var B = require('br4nch'); | ||
var E = require('3x3c'); | ||
var async = require('async'); | ||
var inquirer = require('inquirer'); | ||
var updateNotifier = require('update-notifier'); | ||
var pkg = require('./package.json'); | ||
updateNotifier({pkg}).notify(); | ||
var cmdify = require('cmdify'); | ||
var loader = [ | ||
'/ Installing.', | ||
'| Installing..', | ||
'\\ Installing...', | ||
'- Installing..' | ||
]; | ||
var i = 4; | ||
var ui = new inquirer.ui.BottomBar({bottomBar: loader[i % 4]}); | ||
setInterval(function () { | ||
ui.updateBottomBar(loader[i++ % 4]); | ||
}, 300); | ||
module.exports = function() { | ||
@@ -14,13 +29,18 @@ return new Promise(function (resolve, reject) { | ||
console.log('Not a git repository (or any of the parent directories): .git'); | ||
var questions = [ | ||
{ | ||
type: 'input', | ||
name: 'url', | ||
message: 'What\'s your git repository url?' | ||
} | ||
]; | ||
var prompt = require('prompt'); | ||
prompt.start(); | ||
prompt.get([{name:'url', required: true, description: "Git remote url: Ex. https://github.com/cagataycali/br4anch.git"}], function (err, result) { | ||
E(`git init && git remote add origin ${result.url} && git remote show origin && git symbolic-ref HEAD && echo "# Hi" >> README.md && git add . && git commit -m "Hi" && git push -u origin master`) | ||
.then((value) => { | ||
B() | ||
.then((out) => {resolve(out)}) | ||
}) | ||
.catch((err) => {reject(err)}); | ||
inquirer.prompt(questions).then(function (answers) { | ||
E(`git init && git remote add origin ${answers.url} && git remote show origin && git symbolic-ref HEAD && echo "# Hi" >> README.md && git add . && git commit -m "Hi" && git push -u origin master`) | ||
.then((value) => { | ||
B() | ||
.then((out) => {ui.updateBottomBar('Init done!\n');resolve(out)}) | ||
.catch((err) => {ui.updateBottomBar('Init error!\n', err);reject(err)}) | ||
}) | ||
.catch((err) => {ui.updateBottomBar('Init error!\n', err);reject(err)}); | ||
}); | ||
@@ -27,0 +47,0 @@ }); |
{ | ||
"name": "1n1t", | ||
"version": "1.0.12", | ||
"description": "Git init or get current branch easily", | ||
"version": "1.0.13", | ||
"description": "Create github repository in programmatically.", | ||
"main": "index.js", | ||
@@ -28,2 +28,4 @@ "scripts": { | ||
"br4nch": "^1.0.3", | ||
"cmdify": "0.0.4", | ||
"inquirer": "^1.1.2", | ||
"prompt": "^1.0.0", | ||
@@ -30,0 +32,0 @@ "update-notifier": "^1.0.2" |
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
848057
5
43
7
+ Addedcmdify@0.0.4
+ Addedinquirer@^1.1.2
+ Addedansi-escapes@1.4.0(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcli-cursor@1.0.2(transitive)
+ Addedcli-width@2.2.1(transitive)
+ Addedcmdify@0.0.4(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedexit-hook@1.1.1(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedexternal-editor@1.1.1(transitive)
+ Addedfigures@1.7.0(transitive)
+ Addedinquirer@1.2.3(transitive)
+ Addedmute-stream@0.0.6(transitive)
+ Addedonetime@1.1.0(transitive)
+ Addedos-shim@0.1.3(transitive)
+ Addedrestore-cursor@1.0.1(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrx@4.1.0(transitive)
+ Addedspawn-sync@1.0.15(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedtmp@0.0.29(transitive)
+ Addedtypedarray@0.0.6(transitive)
- Removedmute-stream@0.0.8(transitive)