Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion aio/src/styles/2-modules/_cli-pages.scss
Expand Up @@ -7,4 +7,3 @@
.cli-option-syntax {
white-space: pre;
}

Copy link
Member

@gkalpak gkalpak Jan 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭
UPDATE: Oh, it was an extra line 🤗

9 changes: 8 additions & 1 deletion aio/tools/transforms/templates/cli/lib/cli.html
Expand Up @@ -53,9 +53,16 @@
{% for option in options %}
<tr class="cli-option">
<td>
<code class="cli-option-syntax no-auto-link">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
<code class="cli-option-syntax no-auto-link{% if option.deprecated %} deprecated-api-item{% endif %}">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
</td>
<td>
{% if option.deprecated %}
{% if option.deprecated === true %}
<p><strong>Deprecated</strong></p>
{% else %}
{$ ('**Deprecated:** ' + option.deprecated) | marked $}
{% endif %}
petebacondarwin marked this conversation as resolved.
Show resolved Hide resolved
{% 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 %}
Expand Down