Simple way to run series shell commands from node.js/io.js.
Run single/series shell commands from node.js.
$ npm install shellby --save
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');
});
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');
});
npm test
You can can run series shell commands due to this people:
Copyright (c) 2014 Ruslan Ismagilov. Licensed under the MIT license.