Class Biscotto

Defined in: src/biscotto.coffee

Overview

Public: Biscotto - the TomDoc-CoffeeScript API documentation generator

Class Method Summary

Class Method Details

.detectExtras(done) Source

Public: Find extra project files in the repository.

.detectName(done) Source

Public: Find the project name by either parsing `package.json`, or getting the current working directory name. done - The Function callback to call once this is done

Parameters:

  • (Function) doneThe Function callback to call once this is done

.detectOrigin(done) Source

Public: Find the project's Git remote.origin URL. done - The Function callback to call once this is done

Parameters:

  • (Function) doneThe Function callback to call once this is done

.detectReadme(done) Source

Public: Find the project's README.

.detectSources(done) Source

Public: Find the source directories.

.detectTag(done) Source

Public: Find the project's latest Git tag. done - The Function callback to call once this is done

Parameters:

  • (Function) doneThe Function callback to call once this is done

.generateMetadataSlug(packageJsonPath, parser, options) Source

Public: Builds and writes to metadata.json

.populateSlug(slug, filename, ) Source

Public: Parse and collect metadata slugs

.run(done, file_generator_cb, analytics = false, homepage = false) Source

Public: Run the documentation generator. This is usually done through the command line utility `biscotto` that is provided by this package. This function sets up all of the configuration options used by Biscotto. You can also run the documentation generation without writing files to the file system, by supplying a callback function. done - A Function to callback once the function is done file - A Function to callback on every file analytics - A String representing Google analytics tracking code homepage - The String homepage in the breadcrumbs Examples biscotto = require 'biscotto' file_generator_cb = (filename, content) -> console.log "New file %s with content %s", filename, content done = (err) -> if err console.log "Cannot generate documentation:", err else console.log "Documentation generated" biscotto.run done, file_generator_cb

Examples:

biscotto = require 'biscotto'

file_generator_cb = (filename, content) ->
  console.log "New file %s with content %s", filename, content

done = (err) ->
  if err
    console.log "Cannot generate documentation:", err
  else
    console.log "Documentation generated"

biscotto.run done, file_generator_cb

 

Parameters:

  • (Function) doneA Function to callback once the function is done
  • (Function) fileA Function to callback on every file
  • (String) analyticsA String representing Google analytics tracking code
  • (String) homepageThe String homepage in the breadcrumbs

String .script() Source

Public: Get the Biscotto script content that is used in the webinterface Returns the script contents as a String.

Returns:

  • (String) — Returns the script contents as a String.

String .style() Source

Public: Get the Biscotto style content that is used in the webinterface Returns the style content as a String.

Returns:

  • (String) — Returns the style content as a String.

String .version() Source

Public: Get the current Biscotto version Returns a String representing the Biscotto version

Returns:

  • (String) — Returns a String representing the Biscotto version