 generate = require './generate'
 helpers = require '../helpers'
 logger = require 'loggy'
+{matcher} = require 'anysort'
 
 getPaths = (sourceFile, joinConfig) ->
   sourceFileJoinConfig = joinConfig[sourceFile.type + 's'] or {}

getFiles = (fileList, config, joinConfig, startTime) ->
  map = {}

  fileList.files.forEach (file) ->
    return if not file.error? and not file.data?
    paths = getPaths file, joinConfig

      if file.error
        logger.error formatError file
      if file.data and file.compilationTime >= startTime
        unless checkAnyJoinTo file
          logger.warn "'#{file.path}' compiled, but not written. Check your #{file.type}s.joinTo config."

  Object.keys(map).map (generatedFilePath) ->
    sourceFiles = map[generatedFilePath]
