https://github.com/orlin/childish-process
child_process for grown-ups
https://github.com/orlin/childish-process
Last synced: 6 months ago
JSON representation
child_process for grown-ups
- Host: GitHub
- URL: https://github.com/orlin/childish-process
- Owner: orlin
- Created: 2014-11-21T18:30:43.000Z (over 10 years ago)
- Default Branch: active
- Last Pushed: 2016-01-20T20:15:09.000Z (over 9 years ago)
- Last Synced: 2024-11-11T20:43:40.988Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# childish-process [](https://www.npmjs.com/package/childish-process)
A simpler way to call spawn or exec of `child_process`.
Makes it easy to call spawn with custom event-handlers.
Makes options easy to template, extend, invoke strategies,
generating event-handlers that can notify, for example.## Use
[](https://www.npmjs.org/package/childish-process)
```javascript
var run = require('childish-process');
```- `run(command[, options]);` same as `child_process.spawn` though using [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) for better Windows support
- `run(command[, options], callback);` delegates to `child_process.exec`The options may include a "childish" key with custom event handlers for any of:
`"stdout"`, `"stderr"`, `"error"`, or `"close"`.
It's unlikely that node will ever add a childish option to its `child_process`.See the [`handlers` function](https://github.com/orlin/childish-process/blob/active/index.coffee)
and its defaults for what can be overridden via `childish` options.### Configuration
The configuration options are getting a huge upgrade, to be documented and probably tested.
Meanwhile, example usage can be found in [datomiki](https://github.com/datomicon/datomiki)'s
`gulpfile.js` and `notifications.json`,
while [gulp-npm-test](https://github.com/orlin/gulp-npm-test) is an example for code usage.## Dependencies
[](https://david-dm.org/orlin/childish-process)
[](https://david-dm.org/orlin/childish-process#info=devDependencies)## Unlicensed
This is free and unencumbered public domain software.
For more information, see [UNLICENSE](http://unlicense.org).