Documentation Workflows
FastForward DevTools treats documentation as a combination of API extraction and human-written guides.
How the HTML Documentation Build Works
The docs
command reads two inputs:
- PSR-4 namespace paths from
composer.jsonfor the API reference; - the
docs/directory for the guide pages written in reStructuredText.
Important Command Options
| Command | Option | Default | Purpose |
|---|---|---|---|
docs
|
--source
|
docs
|
Selects the guide source directory. |
docs
|
--target
|
.dev-tools
|
Selects the HTML output directory. |
docs
|
--template
|
vendor/fast-forward/phpdoc-bootstrap-template
|
Selects the phpDocumentor template. |
wiki
|
--target
|
.github/wiki
|
Selects the Markdown API output directory. |
Common Examples
composer docs
vendor/bin/dev-tools docs --source=docs --target=.dev-tools
composer wiki
composer reports
What Each Command Is For
docsbuilds the HTML documentation site. It fails early if the source guide directory does not exist.wikibuilds Markdown API pages intended for.github/wiki.reportsrunsdocs,tests --coverage, andmetricsusing the selected DevTools workspace defaults. With the default workspace that meansdocs --target .dev-tools,tests --coverage .dev-tools/coverage, andmetrics --target .dev-tools/metrics --junit .dev-tools/coverage/junit.xml. When--workspace-dirorFAST_FORWARD_WORKSPACE_DIRselects another workspace, those nested defaults move together unless an explicit command option overrides them.
Outputs to Expect
- an HTML site rooted at the target directory chosen for
docs; - guide pages generated from
docs/; - coverage data under the selected workspace
coveragedirectory whenreportsortests --coverageis used; - metrics data under the selected workspace
metricsdirectory whenreportsormetricsis used; - Markdown API pages under
.github/wikiwhenwikiis used.
Troubleshooting
If docs
fails immediately, check the following:
docs/exists.composer.jsoncontains PSR-4 paths.vendor/bin/phpdocis installed.- The selected template path exists.