code: function copyTemplateDir (srcDir, outDir, vars, cb) {
    if (!cb) {
      if (!vars) vars = noop
      cb = vars
      vars = {}
    }
  
    assert.equal(typeof srcDir, 'string')
    assert.equal(typeof outDir, 'string')
    assert.equal(typeof vars, 'object')
    assert.equal(typeof cb, 'function')
  
    // create directory
    mkdirp(outDir, function (err) {
      if (err) return cb(err)
  
      const rs = readdirp({ root: srcDir })
      const streams = []
      const createdFiles = []
  
      // create a new stream for every file emitted
      rs.on('data', function (file) {
        createdFiles.push(path.join(outDir, maxstache(removeUnderscore(file.path), vars)))
        streams.push(writeFile(outDir, vars, file))
      })
  
      // delegate errors & close streams
      eos(rs, function (err) {
        if (err) return cb(err)
        parallel(streams, function (err) {
          if (err) return cb(err)
          cb(null, createdFiles)
        })
      })
    })
  }
docs: High throughput template dir writes (str, str, obj, fn) -> null