JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8827
  • Score
    100M100P100Q120966F
  • License MIT

Execute shell commands synchronously.

Package Exports

  • exeq

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (exeq) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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