code: function write (targetDir) {
    return async function writeResult (customizeResult) {
      const result = await mapFiles(customizeResult, targetDir, require('./lib/write'))
      return values(result)
    }
  }
docs: Creates a function that writes the result of the `customize#run()` method to a
  local target directory.
  
  @function
  @param {string} targetDir path to the target directory
  @returns {function(object):Promise<string[]>} return a function that writes a customize-result to the targetDir.
  The function takes a customize-result as first parameter and returns a promise for a list of filenames.
  (i.e. the files that were actually written)
  @public