From d577b8df75db8b539e92399cb7f31f3bdbc1257e Mon Sep 17 00:00:00 2001 From: WilliamKoza Date: Sun, 13 Jan 2019 12:32:05 +0100 Subject: [PATCH] fix(docs-infra): render `deprecated` markers for CLI command options (#28111) fixes #27563 fixes #27423 PR Close #28111 --- aio/src/styles/2-modules/_cli-pages.scss | 5 +++++ aio/tools/transforms/templates/cli/lib/cli.html | 1 + 2 files changed, 6 insertions(+) diff --git a/aio/src/styles/2-modules/_cli-pages.scss b/aio/src/styles/2-modules/_cli-pages.scss index 18c869f739..e4a3b14019 100644 --- a/aio/src/styles/2-modules/_cli-pages.scss +++ b/aio/src/styles/2-modules/_cli-pages.scss @@ -8,3 +8,8 @@ white-space: pre; } +.cli-deprecated { + background-color: $brightred;; + padding: 2px 10px; + margin-right: 10px; +} diff --git a/aio/tools/transforms/templates/cli/lib/cli.html b/aio/tools/transforms/templates/cli/lib/cli.html index a010777f4d..7928206873 100644 --- a/aio/tools/transforms/templates/cli/lib/cli.html +++ b/aio/tools/transforms/templates/cli/lib/cli.html @@ -56,6 +56,7 @@ {$ renderOption(option.name, option.type, option.default, option.enum) $} + {% if option.deprecated !== undefined and option.deprecated !== false %} {% if option.deprecated !== true %} {$ option.deprecated | marked $} {% endif %}{% endif %} {$ option.description | marked $} {% if option.default !== undefined %}

Default: {$ option.default $}

{% endif %} {% if option.aliases.length %}

Aliases: {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}

{% endif %}