Preprocess Markdown files.
artisan lara-asp-documentator:preprocess [<path>]
Replaces special instructions in Markdown. Instruction is the link reference definition, so the syntax is:
[<instruction>]: <target>
[<instruction>]: <target> (<parameters>)
[<instruction>=name]: <target>
Where:
<instruction>
the instruction name (unknown instructions will be ignored)<target>
usually the path to the file or directory, but see the instruction description<parameters>
optional JSON string with additional parameters (can be wrapped by(...)
,"..."
, or'...'
)
<target>
- File path.<parameters>
- additional parameterssummary: bool = true
- Include the class summary?description: bool = true
- Include the class description?
Includes the docblock of the first PHP class/interface/trait/enum/etc
from <target>
file. Inline tags include as is except @see
/@link
which will be replaced to FQCN (if possible). Other tags are ignored.
<target>
- Directory path.<parameters>
- additional parametersdepth: array|string|int|null = 0
- Directory Depth (eg the0
means no nested directories, thenull
removes limits).template: string = 'default'
- Blade template.
Returns the list of *.md
files in the <target>
directory. Each file
must have # Header
as the first construction. The first paragraph
after the Header will be used as a summary.
<target>
- Example file path.
Includes contents of the <target>
file as an example wrapped into
```code block```
. It also searches for <target>.run
file, execute
it if found, and include its result right after the code block.
By default, output of <target>.run
will be included as ```plain text```
block. You can wrap the output into <markdown>text</markdown>
tags to
insert it as is.
<target>
- Path to the executable.
Executes the <target>
and returns result.
<target>
- File path.
Includes the <target>
file.
<target>
- Directive name (started with@
sign)
Includes the definition of the directive as a Markdown code block.
<target>
- Directory path.<parameters>
- additional parameterstemplate: string = 'default'
- Blade template.
Generates package list from <target>
directory. The readme file will be
used to determine package name and summary.
<target>
- File path.<parameters>
- additional parametersdata: array
- Array of variables (${name}
) to replace.
Includes the <target>
as a template.
<instruction>
will be processed everywhere in the file (eg within the code block) and may give unpredictable results.<instruction>
cannot be inside text.- Nested
<instruction>
doesn't support.
Directory to process.