feat: add push script

pull/1834/head
mehmet-erim 6 years ago
parent 2c2cd7c1aa
commit f382c9cb1e

@ -4,7 +4,7 @@
"ng": "ng",
"symlink": "symlink",
"abpng": "abpng",
"commit": "git-cz",
"commit": "git-cz && node scripts/push.js",
"lint": "ng lint --fix"
},
"devDependencies": {

@ -15,6 +15,7 @@
"babel-preset-node6": "^11.0.0",
"esm": "^3.2.25",
"execa": "^2.0.3",
"fs-extra": "^8.1.0"
"fs-extra": "^8.1.0",
"prompt-confirm": "^2.0.4"
}
}

@ -0,0 +1,15 @@
const Confirm = require('prompt-confirm');
const execa = require('execa');
(async () => {
const answer = await new Confirm('Would you like to push?').run().then(answer => answer);
if (answer) {
try {
await execa('git', ['push'], { stdout: 'inherit' });
console.log('Successfully!');
} catch (error) {
console.log('An error occured.' + error);
}
}
})();
Loading…
Cancel
Save