     ### 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 }"


  registerContentPlugin: (group, pattern, plugin) ->
    ### Add a content *plugin* to the environment. Files in the contents directory
        matching the glob *pattern* will be instanciated using the plugin's `fromFile`
        factory method. The *group* argument is used to group the loaded instances under
        each directory. I.e. plugin instances with the group 'textFiles' can be found
        in `contents.somedir._.textFiles`. ###

    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
