silki
Version:
Cli tool for build react app, based on generator-react-multipage, create-react-app, roadhog. Support react multiple pages app develop.
12 lines (10 loc) • 388 B
JavaScript
const shell = require('shelljs');
const git = require('simple-git');
const path = require('path');
const dir = path.join(__dirname, '../');
git(dir).branch((err, res) => {
console.log('current branch: ', res.current);
const curBranch = res.current;
const commit = process.argv[2] || 'up';
shell.exec(`git add . && git commit -m "${commit}" && git push origin ${curBranch}`);
});