Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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!
- Host: GitHub
- URL: https://github.com/node-modules/runscript
- Owner: node-modules
- License: other
- Created: 2016-02-04T15:59:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T08:52:22.000Z (about 1 year ago)
- Last Synced: 2024-09-25T16:12:15.353Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 41
- Watchers: 13
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-nodejs - runscript - Run script easy! (Repository / Shell)
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/runscriptRun 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`.