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 --target .dev-toolsandtests --coverage .dev-tools/coverageand thenmetrics --target .dev-tools/metrics --junit .dev-tools/coverage/junit.xml.
Outputs to Expect
- an HTML site rooted at the target directory chosen for
docs; - guide pages generated from
docs/; - coverage data under
.dev-tools/coveragewhenreportsortests --coverageis used; - metrics data under
.dev-tools/metricswhenreportsormetricsis 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.