You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| node_modules | 5 years ago | |
| History.md | 5 years ago | |
| LICENSE.txt | 5 years ago | |
| README.md | 5 years ago | |
| index.d.ts | 5 years ago | |
| index.js | 5 years ago | |
| package.json | 5 years ago | |
README.md
runscript
Run script easy!
Installation
$ npm install runscript
Quick start
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.
const runScript = require('runscript');
runScript('node user-script.js', { stdio: 'pipe' }, { timeout: 10000 })
.then(stdio => {
console.log(stdio);
})
.catch(err => {
console.error(err);
});