DocBox
Search…
JSON Output
Generate JSON output for easy documentation imports into other documentation tools and platforms.

Instantiate DocBox

Begin by creating an instance of DocBox:
1
docbox = new DocBox();
Copied!

Properties

The following are the properties for this strategy:
    projectTitle : Used in the top-level overview-summary.json file
    outputDir : The output directory absolute path
Just pass them in the docbox.addStrategy() call:
1
docbox = new DocBox();
2
docbox.addStrategy( "JSON",
3
{
4
projectTitle = "DocBox API",
5
outputDir = expandPath( "/resources/tmp" )
6
} );
Copied!

Generate Documentation

Now that you have an instance of DocBox configured with your strategy and its properties, just execute the generate() method with its appropriate arguments:
1
docbox.generate(
2
source = "#expandPath( '/docbox' )",
3
mapping = "coldbox",
4
excludes = "tests"
5
);
Copied!
Last modified 8mo ago