shellby
shellby copied to clipboard
Simple way to run series shell commands from node.js/io.js.
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
Credits
You can can run series shell commands due to this people:
| Name | GitHub |
|---|---|
| Ruslan Ismagilov | @isRuslan |
| Jan Bölsche | @regular |
License
Copyright (c) 2014 Ruslan Ismagilov. Licensed under the MIT license.