All Projects → node-modules → runscript

node-modules / runscript

Licence: other
Run script easy!

Programming Languages

javascript
184084 projects - #8 most used programming language

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].