I am in the process of porting a CLI library from Ruby over to Node.js. In my code I execute several third party binaries when necessary. I am not sure how best to accomplis
Use this lightweight npm package: system-commands
npm
system-commands
Look at it here.
Import it like this:
const system = require('system-commands')
Run commands like this:
system('ls').then(output => { console.log(output) }).catch(error => { console.error(error) })