0.2.1 • Published 9 years ago

@eddieajau/shell v0.2.1

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

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