Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/node-modules/runscript

Run script easy!
https://github.com/node-modules/runscript

Last synced: 3 months ago
JSON representation

Run script easy!

Awesome Lists containing this project

README

        

runscript
=======

📢📢📢📢📢 You should use [execa](https://github.com/sindresorhus/execa) instead. 📢📢📢📢

---

[![NPM version][npm-image]][npm-url]
[![Node.js CI](https://github.com/node-modules/runscript/actions/workflows/nodejs.yml/badge.svg)](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)
|
| :---: | :---: | :---: | :---: | :---: | :---: |
[
akitaSummer](https://github.com/akitaSummer)
|[
lgtm-com[bot]](https://github.com/apps/lgtm-com)
|[
semantic-release-bot](https://github.com/semantic-release-bot)
|[
whxaxes](https://github.com/whxaxes)

This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Thu Jan 11 2024 16:25:27 GMT+0800`.