# spawnify

> Create new processes, change directories, auto switch between spawn and exec

Latest version **8.0.1** (published 2023-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install spawnify
pnpm add spawnify
yarn add spawnify
bun add spawnify
```

Provides the command `spawnify`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.0.1 |
| Published | 2023-08-10 |
| First published | 2014-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 5 |
| Unpacked size | 17.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | coderaiser |
| Maintainers | coderaiser |

## Links

- npm: https://www.npmjs.com/package/spawnify
- Repository: https://github.com/coderaiser/spawnify
- Homepage: http://github.com/coderaiser/spawnify
- Issues: https://github.com/coderaiser/spawnify/issues
- npm.io page: https://npm.io/package/spawnify

## Dependencies (5)

- [glob](https://npm.io/package/glob.md) ^10.3.3
- [win32](https://npm.io/package/win32.md) ^7.2.0
- [tildify](https://npm.io/package/tildify.md) ^2.0.0
- [try-catch](https://npm.io/package/try-catch.md) ^3.0.0
- [untildify](https://npm.io/package/untildify.md) ^4.0.0

## Recent versions

- 8.0.1 (latest) — 2023-08-10
- 8.0.0 — 2023-08-10
- 7.0.2 — 2021-01-27
- 7.0.1 — 2021-01-27
- 7.0.0 — 2021-01-20
- 6.0.1 — 2020-02-25
- 6.0.0 — 2019-09-21
- 5.0.1 — 2019-05-15
- 5.0.0 — 2018-11-14
- 4.0.5 — 2018-05-31
- 4.0.4 — 2018-03-21
- 4.0.3 — 2018-02-12
- 4.0.2 — 2018-02-09
- 4.0.1 — 2017-07-12
- 4.0.0 — 2017-07-12
- … 64 more at https://npm.io/package/spawnify/versions

## README

# Spawnify [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL]

[NPMIMGURL]: https://img.shields.io/npm/v/spawnify.svg?style=flat
[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/spawnify/master.svg?style=flat
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
[NPMURL]: https://npmjs.org/package/spawnify "npm"
[BuildStatusURL]: https://travis-ci.org/coderaiser/spawnify "Build Status"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"

Create new processes, change directories, auto switch between spawn and exec.

## Install

```
npm i spawnify --save
```

## How to use?

```js
const spawnify = require('spawnify');
const spawn = spawnify('ls -lha', {
    cwd: __dirname,
});

spawn.on('error', (error) => {
    console.error(error.message);
});

/* not mandatory */
spawn.on('data', (data) => {
    console.log(data);
});

/* not mandatory */
spawn.on('start', () => {
    console.log('process has been started');
    // kill process after start
    spawn.kill();
});

/* not mandatory */
spawn.on('path', (path) => {
    console.log('directory was changed', path);
});

/* not mandatory */
spawn.on('close', () => {
    console.log('process closed');
});

/* not mandatory */
spawn.on('exit', () => {
    console.log('process closed');
});
```

## License

MIT

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