doc
Purpose
Generates a user guide and Javadoc + Groovydoc API documentation for the current Grails project.
Examples
grails doc
Description
Some projects, particular plugins, benefit from documentation explaining how they work. Grails comes with its own documentation engine based on a wiki syntax that can generate both HTML and PDF versions of a user guide, just like the one you are currently reading. If you have the source for a user guide in src/docs
, then this command will automatically generate the corresponding HTML and PDF documents.
It's often useful to have API documentation as well. Since Grails is a mixed source framework, the command also generates both Javadoc (the standard format for Java documentation) and Groovydoc API references in HTML form.
The documentation is generated to the following directories:
docs/api
- Location of javadoc commentsdocs/gapi
- Location of groovydoc commentsdocs/guide
- Location of the user guidedocs/ref
- Location of the reference section of the user guide
Usage:
grails doc
Arguments:
--init
- Create a template project documentation project (optional)--pdf
- Create PDF output for project documentation (optional)
Fired Events:
DocStart
- Before documentation generation beginsDocEnd
- After documentation generation completes