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 node.call(exec, 'npm install', { cwd: dir })
}
npmInstall.bind(null, tplTestPath)
https://nodejs.org/api/child_process.html#child_process_spawning_bat_and_cmd_files_on_windows