Lawsun d230cfbce0 first commit 1 year ago
..
node_modules d230cfbce0 first commit 1 year ago
History.md d230cfbce0 first commit 1 year ago
LICENSE.txt d230cfbce0 first commit 1 year ago
README.md d230cfbce0 first commit 1 year ago
index.d.ts d230cfbce0 first commit 1 year ago
index.js d230cfbce0 first commit 1 year ago
package.json d230cfbce0 first commit 1 year ago

README.md

runscript

📢📢📢📢📢 You should use execa instead. 📢📢📢📢


NPM version Node.js CI Test coverage npm download

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


fengmk2


lusyn


walkthunder


popomore


ottomao


atian25


whxaxes

This project follows the git-contributor spec, auto updated at Fri May 20 2022 10:00:09 GMT+0800.