runscript
📢📢📢📢📢 You should use execa instead. 📢📢📢📢
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);
});
License
MIT
Contributors
This project follows the git-contributor spec, auto updated at Fri May 20 2022 10:00:09 GMT+0800
.