 
   # Run lexer and its hook.
   tryWithFile file, 'tokenizing', -> src = coffee.tokens src
-  src = info.hooks.tokenize(target, src) if info.hooks.tokenize?
+  src = info.hookFns.tokenize(target, src) if info.hookFns.tokenize?
 
   # Run parser and its hook.
   tryWithFile file, 'parsing', -> src = coffee.nodes src
-  src = info.hooks.parse(target, src) if info.hooks.parse?
+  src = info.hookFns.parse(target, src) if info.hookFns.parse?
 
   # Run compiler and its hook.
   tryWithFile file, 'compiling', -> src = src.compile bare: true
-  src = info.hooks.compile(target, src) if info.hooks.compile?
+  src = info.hookFns.compile(target, src) if info.hookFns.compile?
 
   # Write compiled source to target file.
   makeDir path.dirname(target)

docs = ->
  info = loadInfo()
  paths = (path.join(pth, '**/*.coffee') for pth of info.paths)
  withFiles "{#{paths.join()}}", (files) ->
    tryExec('docco', '"' + files.join('" "') + '"')


  info = fillDefaults overrides, defaults

  # Load hooked event handlers, if any.
  info.hookFns = {}
  for hook, module of info.hooks when module?
    info.hooks[hook] = file = path.resolve module
    info.hookFns[hook] = require file

  # Set source and target paths.
  overrides.paths = {src: 'lib'} unless overrides.paths?
