DocBox
  • Introduction
    • Release History
      • What's New With 4.1.0
      • What's New With 4.0.0
    • Contributing
  • Getting Started
    • Installation
    • Configuration
    • Annotating Your Code
  • Output Formats
    • HTML Output
    • JSON Output
      • JSON Schema
    • UML Output
    • Custom Output
Powered by GitBook
On this page
  • Supported Output Formats
  • Backwards Compatibility
  • Generating Multiple Outputs

Was this helpful?

Edit on GitHub
Export as PDF
  1. Getting Started

Configuration

PreviousInstallationNextAnnotating Your Code

Last updated 4 years ago

Was this helpful?

Supported Output Formats

DocBox offers several built-in output formats as well as enabling you to :

Each format is configured by its alias name, such as "JSON" or "HTML".

var docbox = new docbox.DocBox();
docbox.addStrategy( "UML", { outputFile : "./tmp/docs/app-diagram.uml" })

Backwards Compatibility

For backwards compatibility, specifying the full class path is still supported, as is specifying a single strategy when initializing DocBox:

variables.docbox = new docbox.DocBox(
  strategy = "docbox.strategy.uml2tools.XMIStrategy",
  properties={ 
    projectTitle = "DocBox Tests",
    outputFile   = variables.testOutputFile
  }
);
new docbox.DocBox()
    .addStrategy( "HTML", {
        projectTitle : "CommandBox",
        outputDir : expandPath( './docs' )
    } )
    .generate(
       source = expandPath( "/app" ),
       mapping = "app",
       excludes="(coldbox)"
    );

Generating Multiple Outputs

You can call the .addStrategy() method multiple times to specify multiple output formats:

new docbox.DocBox()
   .addStrategy( "HTML", {
      projectTitle="My Docs",
      outputDir="#expandPath( '/docs/html' )#"
   } )
   .addStrategy( "JSON", {
      projectTitle="My Docs",
      outputDir="#expandPath( '/docs/json' )#"
   } )
   .generate(
      source = expandPath( "/app" ),
      mapping = "app",
      excludes="(coldbox)"
   );
create your own
HTML
JSON
UML