lib/orderFiles.js
function orderFiles (allFiles, dependencies) {
  var result = []
  allFiles.forEach(function (newFile) {
    addWithDependencies(allFiles, newFile, dependencies, result, [])
  })
  return result
}
function orderFiles (allFiles, dependencies) {
  var result = []
  allFiles.forEach(function (newFile) {
    addWithDependencies(allFiles, newFile, dependencies, result, [])
  })
  return result
}
Order files by their dependencies (insert dependencies first)
@param {string[]} allFiles all filenames, for consistency checks
@param {object<string[]>} dependencies each property contains the dependencies for the file named like the key
@return {string[]}