node-exec-promise
v1.0.2
Published
Execute commands from Node.js and get a Promise back.
Downloads
4,153
Maintainers
Readme
node-exec-promise
Installation
npm install --save node-exec-promise
Example Usage
var exec = require('node-exec-promise').exec;
exec('ls -lah /tmp').then(function(out) {
console.log(out.stdout, out.stderr);
}, function(err) {
console.error(err);
});
Example Gulp Usage
var execFile = require('node-exec-promise').execFile;
gulp.task('example', function(done) {
execFile('ls', ['-lah', '/tmp']).then(function(out) {
done();
}, function(err) {
// handle error
});
});