0.2.0 • Published 11 years ago
shellby v0.2.0
shellby 
Run single/series shell commands from node.js.
Install
$ npm install shellby --saveUsage
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 testLicense
Copyright (c) 2014 Ruslan Ismagilov. Licensed under the MIT license.