   ###
 
   buildDocsDirectory: ->
-    fs.mkdirSync('./docs') unless fs.existsSync('./docs')
+    fs.mkdirSync(@docsDirectory()) unless fs.existsSync(@docsDirectory())
 
-    staticPath = path.join(__dirname, '../static')
+    staticPath = @sourceDirectory('static')
     for source in fs.readdirSync(staticPath)
-      @copyFile(path.join(staticPath, source.toString()), './docs')
+      @copyFile(path.join(staticPath, source.toString()), @docsDirectory())
 
   copyFile: (source, dir) ->
     destination = path.join(dir, path.basename(source))

    @args = @args.argv

  ###
  Section: Metadata
  ###


    fs.writeFileSync(filePath, doc)

  renderFile: (file) ->
    @render(FilePage.render(file), @docsDirectory(path.basename(file, path.extname(file))))

  renderClass: (klass) ->
    @render(ClassPage.render(klass), @docsDirectory(klass.name))

module.exports = Cli
