 
   renderDocs: (sourcePaths, outPath, options={}) ->
     sourcePaths ?= atom.project.getPaths()
-    outPath ?= '/Users/jessegrosjean/Desktop/gitbooktest'
+    outPath ?= '/Users/jessegrosjean/Desktop/birchapi'
     if sourcePaths
       unless fs.existsSync(outPath)
         fs.mkdirSync(outPath)

  resolveStaticReference: (klass, item, text) ->
    switch
      when klass is '' then { name: text, url: "#static-#{item}" }
      when @metadata.classes[klass] then { name: text, url: "../#{klass}#static-#{item}" }
      when @referenceMap[klass] then { name: text, url: "#{mozillaJavascriptBaseUrl}/#{klass}/#{item}" }

  resolveInstanceReference: (klass, item, text) ->
    switch
      when klass is '' then { name: text, url: "#instance-#{item}" }
      when @metadata.classes[klass] then { name: text, url: "../#{klass}#instance-#{item}" }
      when @referenceMap[klass] then { name: text, url: "#{mozillaJavascriptBaseUrl}/#{klass}/#{item}" }

  resolveClassReference: (klass, text) ->
    switch
      when @metadata?.classes?[klass]
        { name: klass, url: '../' + klass}
      when @referenceMap[klass]
        { name: klass, url: @referenceMap[klass] }
      else text

  renderClasses: (outPath, options) ->
    for name, clazz of @metadata.classes
      renderedClazz = @renderClass clazz, options
      #classDir = path.join(outPath, name)
      #unless fs.existsSync(classDir)
      #  fs.mkdirSync(classDir)
      #fs.writeFileSync(path.join(classDir, 'index.md'), renderedClazz)
      fs.writeFileSync(path.join(outPath, "#{name}.md"), renderedClazz)
  renderClassList: (outPath) ->
    classes = []
    for name, clazz of @metadata.classes
