1.0.2 • Published 5 years ago

@wickning1/async-exec v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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.