Skip to content

Instantly share code, notes, and snippets.

Created October 2, 2016 00:48
What would you like to do?
good way to call child processes inside a node script

elegantly call child processes within node

const node = require('when/node')
const {exec} = require('child_process')
const tplTestPath = path.join(__dirname, 'example')

function npmInstall (dir) {
  return, 'npm install', { cwd: dir })

npmInstall.bind(null, tplTestPath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment