 #
 # Returns nothing.
 initialize = (options, configParams, onCompile, callback) ->
-  packages = loadPackages '.'
-
   if options.config?
     logger.warn '`-c, --config` option is deprecated. Use `--env` and `config.overrides` instead'
   if options.optimize?

  # Load config, get brunch packages from package.json.
  helpers.loadConfig options.config, configParams, (error, config) ->
    joinConfig = config._normalized.join
    plugins    = getPlugins packages, config

    plugins = plugins.filter (plugin) ->
      plugin.optimize ?= plugin.minify if typeof plugin.minify is 'function'
      plugin.defaultEnv ?= if not config.optimize and typeof plugin.optimize is 'function'
        'production'
      else
        '*'

        return false unless plugin::?.extension in config.workers.extensions
      plugin::?.brunchPlugin and (not worker.isWorker or plugin::?.compile or plugin::?.lint)
    .map (plugin) ->
      instance = new plugin config
      instance.brunchPluginName = plugin.brunchPluginName
      instance

loadPackages = (rootPath, callback) ->
  rootPath = sysPath.resolve rootPath
