shellby
v0.2.0
Published
Run series shell commands
Downloads
14
Maintainers
Readme
shellby 
Run single/series shell commands from node.js.
Install
$ npm install shellby --save
Usage
var shellby = require('shellby');
shellby.exec('mkdir hello', function (err) {
console.log('dir created');
});
shellby.series(['git pull', 'npm i'], function (err) {
console.log('done');
});
Options
You can specify an options object for each command. See NodeJS documentation on spawn
for what options are supported. If no options are specified, they default to {stdio: inherit}
.
var shellby = require('shellby');
shellby.exec('make', {env: {DEBUG: true}}, function (err) {
console.log('make run');
});
shellby.series([
'git clone https://github.com/foo/bar.git',
['npm i', {cwd: 'bar'}]
], function (err) {
console.log('done');
});
Test
npm test
License
Copyright (c) 2014 Ruslan Ismagilov. Licensed under the MIT license.