exeq

Execute shell commands synchronously.

npm install exeq
2 downloads in the last day
63 downloads in the last week
293 downloads in the last month

exeq

Excute shell commands synchronously.

Build Status NPM version David Status


Install

$ npm install exeq --save

Usage

exeq(array)

var exeq = require('exeq');

// cd command would change spawn cwd automatically
var q = exeq([
  'mkdir example',
  'cd example',
  'touch README.md',
  'touch somefile',
  'rm somefile',
  'ls -l',
  'cd ..',
  'rm -rf example',
  'ls -l > output.txt'
]);

q.on('each', function(command, index) {
  // After each command executed
  console.log('No.' + index + ' Executed: ' + command);
  console.log();
});

q.on('done', function(count) {
  console.log('---');
  console.log(count + ' commands done!');
});

// execute the commands
q.run();

Do not support command string with && .

Test

$ npm test

License

The MIT License (MIT)

Bitdeli Badge

npm loves you