@eddieajau/shell

0.2.1 • Public • Published

Node.js Shell

Build Status Dependency Status

A simple command runner for Node.js with promise support.

Installation

$ npm install @eddieajau/shell

Example

var Shell = require('@eddieajau/shell');

// Optionally set a logger.
Shell.setLogger(console.log);

// Execute the shell command.
Shell.exec('ls', [], { cwd: __dirname })
	.then(function (result) {
		console.log('The command returned %d', result.code);
		console.log('STDOUT:', result.stdout.join('\n'));
		console.log('STDERR:', result.stderr.join('\n'));
	})
	.catch(function (err) {
		console.error('The child process emitted an error.', err);
	});

Code quality and tests

$ npm run lint
$ npm run test

License

MIT

Package Sidebar

Install

npm i @eddieajau/shell

Weekly Downloads

0

Version

0.2.1

License

MIT

Last publish

Collaborators

  • eddieajau