(Quick Reference)

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 comments
  • docs/gapi - Location of groovydoc comments
  • docs/guide - Location of the user guide
  • docs/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 begins
  • DocEnd - After documentation generation completes