# easy-spawn

> Utilities that make it easier to write child_process.spawn programmes

Latest version **0.0.2** (published 2013-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install easy-spawn
pnpm add easy-spawn
yarn add easy-spawn
bun add easy-spawn
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2013-05-31 |
| First published | 2013-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | dong |
| Maintainers | dong |
| Keywords | spawn, child_process, cli |

## Links

- npm: https://www.npmjs.com/package/easy-spawn
- Repository: https://github.com/ddliu/node-easy-spawn
- npm.io page: https://npm.io/package/easy-spawn

## Dependencies (1)

- [config-obj](https://npm.io/package/config-obj.md) 0.0.1

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2013-05-31
- 0.0.1 — 2013-05-31

## README

# easy-spawn

Utilities that make it easier to write child_process.spawn programmes.

## Features

- Easy to use
- Standard callback with `err` and `data`

## Usage

Below are some examples of how to work with `easy-spawn`, you can find more examples under the `/test/` directory

### Get file list with `ls`

```js
var Spawn = require('easy-spawn');

spawn = new Spawn({
    cwd: '/working directory where you want to ran command',
});

spawn.cmd('ls', function(err, data) {
   console.log(data); 
});

spawn.cmd(['ls', '-l', '/var/log'], function(err, data) {
    console.log(data);
});
```

### Get your git version

```js
var Spawn = require('easy-spawn');

spawn = new Spawn();
spawn.cmd(['git', '--version'], function(err, data) {
   console.log(data); // git version 1.7.xxx 
});
```

## Installation

```bash
npm install easy-spawn
```

---
_Source: https://npm.io/package/easy-spawn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
