function makeFiles(files) {
  return files.reduce(
    (obj, [filename, content]) => (obj[filename] = (content ? {content} : content), obj),
    {}
  );
}
Expects an array of the form [[filename, content], [filename, content], ...]