 config = require('../../config')
 util = require('../../util')
 umd = require('../umd')
+sort = require('../sort')
 
 formatName = (name) ->
   name.replace(/-(.)/, (match, x) -> x.toUpperCase())

    namespace: undefined
    isPlugin: undefined
    umd: {}
  }
  (options) ->
    name ?= util.loadPackageJson().name

    options.namespace ?= options.exports

    return lib.pipe.lazypipe()
    .pipe -> sort(options.sort)
    .pipe -> lib.pipe.concat("#{name}.coffee")
    .pipe -> lib.metadata.data((file) ->
      file.data ?= {}
