shellby

0.2.0 • Public • Published

shellby Build Status

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.

Package Sidebar

Install

npm i shellby

Weekly Downloads

4

Version

0.2.0

License

MIT

Last publish

Collaborators

  • is_ruslan