runscript
=======
📢📢📢📢📢 You should use [execa](https://github.com/sindresorhus/execa) instead. 📢📢📢📢
---
[![NPM version][npm-image]][npm-url]
[](https://github.com/node-modules/runscript/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/runscript.svg?style=flat-square
[npm-url]: https://npmjs.org/package/runscript
[codecov-image]: https://codecov.io/github/node-modules/runscript/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/runscript?branch=master
[download-image]: https://img.shields.io/npm/dm/runscript.svg?style=flat-square
[download-url]: https://npmjs.org/package/runscript
Run script easy!
## Installation
```bash
$ npm install runscript
```
## Quick start
```js
const runScript = require('runscript');
runScript('node -v', { stdio: 'pipe' })
.then(stdio => {
console.log(stdio);
})
.catch(err => {
console.error(err);
});
```
### run with timeout
Run user script for a maximum of 10 seconds.
```js
const runScript = require('runscript');
runScript('node user-script.js', { stdio: 'pipe' }, { timeout: 10000 })
.then(stdio => {
console.log(stdio);
})
.catch(err => {
console.error(err);
});
```
## License
[MIT](LICENSE.txt)
## Contributors
|[
fengmk2](https://github.com/fengmk2)
|[
lusyn](https://github.com/lusyn)
|[
walkthunder](https://github.com/walkthunder)
|[
popomore](https://github.com/popomore)
|[
ottomao](https://github.com/ottomao)
|[
atian25](https://github.com/atian25)
|
| :---: | :---: | :---: | :---: | :---: | :---: |
[
whxaxes](https://github.com/whxaxes)
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Fri May 20 2022 10:00:09 GMT+0800`.