To let Leantime Documentor analyse your codebase, you have to use the parse
command and point it to the right directory:
vendor/bin/leantime-documentor parse src
The format in which you want to export the hooks.
Format | Description |
---|---|
default |
Symfony console table. |
hookster |
Hookster JSON. |
markdown |
Markdown. |
phpdocumentor-rst |
RestructuredText for phpDocumentor. |
Example: --format=markdown
Custom PHP template, see for examples the templates
folder.
Example: --template=templates/markdown.php
Specify whether you want to export actions
or filters
.
Example: --type=actions
or --type=filters
Write output to file.
Example: --output=docs/hooks.md
Specifies the memory limit in the same format php.ini
accepts.
Example: --memory-limit=-1
Exclude the specified folders/files.
Example: --exclude=vendor
If the search directory contains a .gitignore
file, you can reuse those rules to exclude files and directories from the results with this option.
Example: --ignore-vcs-ignored
Only parse hooks starting with the specified prefixes.
Example: --prefix=my_theme --prefix=my_plugin
vendor/bin/leantime-documentor parse ./tests/source
vendor/bin/leantime-documentor parse ./tests/source --format=hookster --type=actions --output=tests/docs/hookster-actions.json
vendor/bin/leantime-documentor parse ./tests/source --format=hookster --type=filters --output=tests/docs/hookster-filters.json
vendor/bin/leantime-documentor parse ./tests/source --format=markdown --output=tests/docs/hooks.md
vendor/bin/leantime-documentor parse ./tests/source --format=phpdocumentor-rst --type=actions --output=tests/docs/phpdocumentor-actions.rst
vendor/bin/leantime-documentor parse ./tests/source --format=phpdocumentor-rst --type=filters --output=tests/docs/phpdocumentor-filters.rst