@wickning1/async-exec

1.0.2 • Public • Published

async-exec

Utility library for working with async/await instead of streams when executing commands with child-process

Usage

const exec = require('@wickning1/async-exec')
async function main() {
  const { output, stdout, stderr } = await exec('ffmpeg', ['-i', 'inputpath'],
    ({ output, stdout, stderr}) => {
      if (stdout) console.log(`progress: ${stdout}`)
    }
  )
  console.log('Done!')
}
main()

output is the combination of stdout and stderr for extra simplicity.

Package Sidebar

Install

npm i @wickning1/async-exec

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

3.32 kB

Total Files

4

Last publish

Collaborators

  • wickning1