JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 267765
  • Score
    100M100P100Q165042F
  • License MIT

A tiny cross-platform promise based wrapper around child_process.spawn.

Package Exports

  • shell-exec
  • shell-exec/dist/index.js
  • shell-exec/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (shell-exec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🐚 shell-exec

package version package downloads standard-readme compliant package license make a pull request

A tiny cross-platform promise based wrapper around child_process.spawn.

Table of Contents

⚙️ Install

Install the package locally within you project folder with your package manager:

With npm:

npm install shell-exec

With yarn:

yarn add shell-exec

With pnpm:

pnpm add shell-exec

📖 Usage

import shellExec from 'shell-exec'
shellExec('echo Hi!').then(console.log).catch(console.log)

📚 API

shellExec(command, options)

Parameters:

  • command {String | Array} - String or Array of commands to run
  • options {Object} - Options object passed to child_process.spawn

The function then returns a Promise.

See the hosted docs here.

💬 Contributing

Got an idea for a new feature? Found a bug? Contributions are welcome! Please open up an issue or make a pull request.

🪪 License

MIT © Tiaan du Plessis