package
A node.js module to make executing shell cmds a breeze!
npm install exeggcuteGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
A node.js module to make executing shell cmds a breeze!

Use npm as usual to save the package to your dependencies:
npm install --save exeggcuteconst exec = require('exeggcute').exec;
var dir = 'c:/code/';
var cmd = 'git clone https://github.com/styfle/exeggcute';
exec(cmd, dir);const exec = require('exeggcute').exec;
var dir = '/code/';
var cmd = 'git clone https://github.com/styfle/exeggcute';
exec(cmd, dir);import {exec} from 'exeggcute';
var dir = '/code/';
var cmd = 'git clone https://github.com/styfle/exeggcute';
exec(cmd, dir);exeggcute is named after the pokemon, Exeggcute. You can see more code/projects named after pokemon at repokemon.
I wanted to execute a chain of commands that reads nicely and not worry about syntax.
Below is an example that mirrors code from the originRepo to the targetRepo.
This is a hook that runs for each push of a branch or tag to the originRepo and will then push that branch/tag to the targetRepo.
hasDir(repoDir)
.then(exists => {
if (!exists) {
return exec(`git clone ${originRepo}`, baseDir)
.then(() => exec(`git remote add target ${targetRepo}`, repoDir))
}
return Promise.resolve(exists);
})
.then(() => exec(`git checkout ${branch}`, repoDir))
.then(() => exec(`git pull origin ${branch}`, repoDir))
.then(() =>