https://github.com/cellular/spawn-bin
Spawns a new Node process that runs the bin file of a given package.
https://github.com/cellular/spawn-bin
Last synced: about 1 year ago
JSON representation
Spawns a new Node process that runs the bin file of a given package.
- Host: GitHub
- URL: https://github.com/cellular/spawn-bin
- Owner: cellular
- Created: 2018-02-12T09:27:29.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T23:54:30.000Z (about 6 years ago)
- Last Synced: 2025-02-15T11:19:44.115Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spawn-bin
[](https://travis-ci.org/cellular/spawn-bin) [](https://greenkeeper.io/)
[](http://npm.im/spawn-bin)
Spawns a new Node process that runs the bin file of a given package.
## API
### `spawnBin(bin, args, [opts])`
Same as API as [child_process.spawnSync](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options) with `bin` being [resolved](https://www.npmjs.com/package/resolve-bin) first.
If the name of the executable does not equal the package name you can use the format `:`:
```js
spawnBin('flow-bin:flow', ['.']);
```
__Note:__ The `stdio` option is set to `'inherit'` by default.
# License
MIT