Package Exports
- shell-exec
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shell-exec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
shell-exec
A tiny cross-platform promise based wrapper around child_process.spawn.
Table of Contents
Install
This project uses node and npm.
$ npm install shell-exec
$ # OR
$ yarn add shell-exec
Usage
const shellExec = require('shell-exec')
shellExec('echo Hi!').then(console.log).catch(console.log)
// Hi!
// { stdout: '', stderr: '', cmd: 'echo Hi!', code: 0 }
API
shellExec(command, options)
Parameters:
command
{String | Array} - String or Array of commands to runoptions
{Object} - Options object passed tochild_process.spawn
The function then returns a Promise
.
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature' 3.Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT