Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabiandev/node-exec-promise
Execute commands from Node.js and get a Promise back.
https://github.com/fabiandev/node-exec-promise
exec javascript node promise
Last synced: 7 days ago
JSON representation
Execute commands from Node.js and get a Promise back.
- Host: GitHub
- URL: https://github.com/fabiandev/node-exec-promise
- Owner: fabiandev
- License: mit
- Created: 2016-05-29T07:53:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T00:06:55.000Z (about 6 years ago)
- Last Synced: 2024-09-21T09:18:29.053Z (about 2 months ago)
- Topics: exec, javascript, node, promise
- Language: JavaScript
- Size: 9.77 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-exec-promise
# Installation
```bash
npm install --save node-exec-promise
```# Example Usage
```js
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
```js
var execFile = require('node-exec-promise').execFile;gulp.task('example', function(done) {
execFile('ls', ['-lah', '/tmp']).then(function(out) {
done();
}, function(err) {
// handle error
});
});
```