runscript
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

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


akitaSummer


lgtm-com[bot]


semantic-release-bot


whxaxes

This project follows the git-contributor spec, auto updated at Thu Jan 11 2024 16:25:27 GMT+0800.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.6.0
    24,125
    • latest

Version History

Package Sidebar

Install

npm i runscript

Weekly Downloads

28,332

Version

1.6.0

License

MIT

Unpacked Size

10.8 kB

Total Files

5

Last publish

Collaborators

  • atian25
  • dead_horse
  • fengmk2
  • popomore