fix(docs-infra): render `deprecated` markers for CLI command options (#28111)

fixes #27563
fixes #27423

PR Close #28111
This commit is contained in:
WilliamKoza 2019-01-13 12:32:05 +01:00 committed by Andrew Kushnir
parent cd0451305a
commit d577b8df75
2 changed files with 6 additions and 0 deletions

View File

@ -8,3 +8,8 @@
white-space: pre;
}
.cli-deprecated {
background-color: $brightred;;
padding: 2px 10px;
margin-right: 10px;
}

View File

@ -56,6 +56,7 @@
<code class="cli-option-syntax no-auto-link">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
</td>
<td>
{% if option.deprecated !== undefined and option.deprecated !== false %}<label class="raised cli-deprecated">deprecated</label> {% if option.deprecated !== true %} {$ option.deprecated | marked $} {% endif %}{% endif %}
{$ option.description | marked $}
{% if option.default !== undefined %}<p><span class="cli-default">Default:</span> <code class="no-auto-link">{$ option.default $}</code></p>{% endif %}
{% if option.aliases.length %}<p><span class="cli-aliases">Aliases:</span> {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endif %}