Skip to content

lusyn/runscript

 
 

Repository files navigation

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


walkthunder


popomore


ottomao


atian25


lusyn


whxaxes

This project follows the git-contributor spec, auto updated at Tue Mar 08 2022 10:02:22 GMT+0800.

About

Run script easy!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%