Skip to content

A Node.js chainable, promise-based utility for running commands with child_process.spawn

Notifications You must be signed in to change notification settings

UmbraEngineering/command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

command

A Node.js chainable, promise-based utility for running commands with child_process.spawn

Install

$ npm install command

Usage

var command = require('command');

command.open('/some/directory/path')
	.on('stdout', command.writeTo(process.stdout))
	.on('stderr', command.writeTo(process.stderr))
	.chdir('..')
	.exec('ls')
	.then(function() {
		var stdout = this.lastOutput.stdout;
		if (! stdout.trim().length) {
			console.warn('No files found!');
		}
	});

About

A Node.js chainable, promise-based utility for running commands with child_process.spawn

Resources

Stars

Watchers

Forks

Packages

No packages published