     ### Resolve locals and loads any required modules. ###
     @locals = {}
 
-    # Load locals json if neccessary
+    # Load locals json if necessary
     if typeof @config.locals == 'string'
       filename = @resolvePath @config.locals
       @logger.verbose "loading locals from: #{ filename }"

    return rv

  loadPluginModule: (module, callback) ->
    ### Load a plugin *module*. Calls *callback* when plugin is done loading, or an error ocurred. ###
    id = 'unknown'
    done = (error) ->
      error.message = "Error loading plugin '#{ id }': #{ error.message }" if error?

    path.resolve @contentsPath, pathname or ''

  resolveModule: (module) ->
    ### Resolve *module* to an absolute path, mimicking the node.js module loading system. ###
    switch module[0]
      when '.'
        require.resolve @resolvePath module
