BoxLang 🚀 A New JVM Dynamic Language Learn More...
██████╗ ██████╗ ██████╗██████╗ ██████╗ ██╗ ██╗
██╔══██╗██╔═══██╗██╔════╝██╔══██╗██╔═══██╗╚██╗██╔╝
██║ ██║██║ ██║██║ ██████╔╝██║ ██║ ╚███╔╝
██║ ██║██║ ██║██║ ██╔══██╗██║ ██║ ██╔██╗
██████╔╝╚██████╔╝╚██████╗██████╔╝╚██████╔╝██╔╝ ██╗
╚═════╝ ╚═════╝ ╚═════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝
DocBox is a JavaDoc-style documentation generator for your CFML codebase based on Mark Mandel's ColdDoc project.
Docs | Github | Ortus Community
Use the DocBox library to generate API docs from your CFC files. Install Docbox with CommandBox like so:
box install docbox
If you want to use DocBox for document generation in your CFML application, then just drop it into any location and create a /docbox
mapping to it. You will then instantiate the DocBox
generator class with a strategy
and properties
for the strategy.
// use custom strategy found at class.path
docbox = new docbox.DocBox( strategy="class.path", properties={} );
// create with HTML strategy
docbox = new docbox.DocBox(
strategy = "HTML",
properties = {
projectTitle="My Docs",
outputDir="#expandPath( '/docs' )#"
}
);
To generate the documentation you will then execute the generate()
method on the DocBox object and pass in the following parameters:
source
: A path to the source location or an array of structs of locations that must have a dir
and mapping
key on it.mapping
: The base mapping for the folder source. Used only if source
is a pathexcludes
: A regular expression that will be evaluated against all CFCs sent for documentation. If the regex matches the CFC name and path then the CFC will be excluded from documentation.docbox.generate( source="/my/path", mapping="coldbox" );
docbox.generate(
source = "#expandPath( '/docbox' )#",
mapping = "docbox",
excludes = "tests"
);
Once the generation finalizes, you will see your beautiful docs!
HTML
- default
projectTitle
: The HTML titleoutputDir
: The output directoryJSON
projectTitle
: The HTML titleoutputDir
: The output directoryXMI
outputFile
: The output fileThere is a related project you can install which wraps up the DocBox library in a Custom CLI command so you can generate API docs from the command line.
box install commandbox-docbox
Read more here: https://github.com/Ortus-Solutions/commandbox-docbox
Apache License, Version 2.0.
Please use our Jira instance to create bugs and new feature issues: https://ortussolutions.atlassian.net/projects/DOCBOX
Thanks to Mark Mandel for allowing us to fork his project.
I THANK GOD FOR HIS WISDOM FOR THIS PROJECT
"I am the way, and the truth, and the life; no one comes to the Father, but by me (JESUS)" Jn 14:1-12
Come find us on the CFML Slack (#box-products channel) and ask us there. We'd be happy to help!
Join us in our Ortus Community and become a valuable member of this project https://community.ortussolutions.com/c/communities/docbox/17. We are looking forward to hearing from you!
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
http
instead of https
on download URLbuild/Docs.cfc
task for building the documentation using itself, before we where getting away with it because there was a previous DocBox version. Now we need to build the docs with the current version of DocBox.box.zip
in root from old scripts@myCustomTag
custom docblock tags on methods. (Already supported on components and properties, but missing on methods).json
output strategy for machine-readable documentationaddStrategy()
method for multiple strategy supportstrategy="HTML"
.docbox.addStrategy( "HTML", props )
to set your desired output format.()
@throws
annotation to function definitions@deprecated
annotation to function definitions
$
box install docbox