0.3.5 • Published 9 years ago

outer-shelljs v0.3.5

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

outer-shelljs

ShellJS wrapper

  • findByRegex()
  • grep() that accepts any grep variant option
  • _(method, ...) proxy that emits events after each call

Build Status

Example

var shelljs = require('outer-shelljs').create();
var exists = shelljs._('test', '-e', '/path/to/file');
var files = shelljs.findByRegex('/path/to/dir', /\.js$/);

Installation

NPM

npm install outer-shelljs

API

Documentation

Events

cmd

Fires after any _() call.

shelljs.on('cmd', function(method, argArray, returnVal) {
  console.log(
    'called %s with %s and returned %s',
    method, JSON.stringify(argArray), JSON.stringify(returnVal)
  );
});

cmd:<method>

Fires after a _() call for a specific ShellJS method, ex. exec.

shelljs.on('cmd:exec', function(argArray, returnVal) {
  console.log(
    '`exec` was called with %s and returned %s',
    JSON.stringify(argArray), JSON.stringify(returnVal)
  );
});

License

MIT

Tests

npm test
0.4.1

9 years ago

0.4.0

9 years ago

0.3.5

11 years ago

0.3.4

11 years ago

0.3.3

11 years ago

0.3.2

11 years ago

0.3.1

11 years ago

0.3.0

11 years ago