Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 2f49e63

Browse files
authored
Merge pull request #5268 from magento/ds_add-note-cli-ref
Add a note about autogenerated content editing to CLI reference
2 parents 60c467b + f490f5e commit 2f49e63

File tree

2 files changed

+59
-58
lines changed

2 files changed

+59
-58
lines changed

_includes/mrg/note.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<div class="bs-callout bs-callout-info" markdown="1">
1+
{: .bs-callout-info }
22
This topic is generated automatically from the corresponding README in the Magento codebase.
33
If you want to contribute, refer to [Magento Code Contributions]({{ page.baseurl] }}/contributor-guide/contributing.html).
4-
</div>

_includes/reference/cli-template.md

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -12,80 +12,82 @@ The initial list is auto generated using the `{{ tool }} list` command at the {{
1212

1313
{{ intro }}
1414

15+
## Reference
16+
17+
{: .bs-callout-info }
18+
This reference is generated from the Magento codebase. To add or update the content, you must update the source code for the corresponding CLI command in the [Magento 2 codebase](https://github.com/magento/magento2) repository and submit your changes for review. For contribution guidelines, see [Magento Code Contributions]({{ page.baseurl] }}/contributor-guide/contributing.html).
19+
1520
{% for command in commands %}
1621
{% assign arguments = command.definition.arguments %}
1722
{% assign options = command.definition.options %}
1823

19-
## `{{ command.name }}`
24+
### `{{ command.name }}`
2025

2126
{{ command.description }}
2227

2328
```bash
2429
{{ tool }} {{ command.usage }}
2530
```
2631

27-
{% unless arguments.size == 0 %}
32+
{% unless arguments.size == 0 %}
2833

29-
### Arguments
30-
{: .no_toc}
34+
#### Arguments
3135

32-
{% for argument in arguments %}
36+
{% for argument in arguments %}
3337
{% for item in argument %}
34-
{% if item.name %}
35-
36-
{% if item.default == empty %}
37-
{% endif %}
38-
39-
#### `{{ item.name }}`
40-
41-
- Description: {{ item.description }}
42-
{% unless item.default == nil %}
43-
{% if item.default == false or (item.default == empty and item.default != '') %}
44-
- Default: `{{ item.default | inspect }}`
45-
{% else %}
46-
- Default: `{{ item.default }}`
47-
{% endif %}
48-
{% endunless %}
49-
{% if item.is_required %}
50-
- Required
51-
{% endif %}
52-
{% if item.is_array %}
53-
- Array
54-
{% endif %}
55-
{% endif %}
56-
{% endfor %}
57-
{% endfor %}
58-
59-
### Options
60-
{: .no_toc}
38+
{% if item.name %}
39+
{% if item.default == empty %}
40+
{% endif %}
41+
42+
##### `{{ item.name }}`
43+
44+
- Description: {{ item.description }}
45+
{% unless item.default == nil %}
46+
{% if item.default == false or (item.default == empty and item.default != '') %}
47+
- Default: `{{ item.default | inspect }}`
48+
{% else %}
49+
- Default: `{{ item.default }}`
50+
{% endif %}
51+
{% endunless %}
52+
{% if item.is_required %}
53+
- Required
54+
{% endif %}
55+
{% if item.is_array %}
56+
- Array
57+
{% endif %}
58+
{% endif %}
59+
{% endfor %}
60+
{% endfor %}
61+
62+
#### Options
6163

6264
{% for option in options %}
6365
{% assign opt = option[1] %}
6466

65-
#### {{ option[0] }}
66-
67-
- Option: `{{ opt.name }}`
68-
{% if opt.shortcut contains '-' %}
69-
- Shortcut: `{{ opt.shortcut }}`
70-
{% endif %}
71-
- Description: {{ opt.description }}
72-
{% unless opt.default == nil %}
73-
{% if opt.default == false or (opt.default == empty and opt.default != '') %}
74-
- Default: `{{ opt.default | inspect }}`
75-
{% else %}
76-
- Default: `{{ opt.default }}`
77-
{% endif %}
78-
{% endunless %}
79-
{% if opt.is_value_required %}
80-
- Requires a value
81-
{% elsif opt.accept_value and opt.is_multiple %}
82-
- Accepts multiple values
83-
{% elsif opt.accept_value and opt.is_multiple == false %}
84-
- Accepts a value
85-
{% else %}
86-
- Does not accept a value
87-
{% endif %}
88-
{% endfor %}
67+
##### `{{ option[0] }}`
68+
69+
- Option: `{{ opt.name }}`
70+
{% if opt.shortcut contains '-' %}
71+
- Shortcut: `{{ opt.shortcut }}`
72+
{% endif %}
73+
- Description: {{ opt.description }}
74+
{% unless opt.default == nil %}
75+
{% if opt.default == false or (opt.default == empty and opt.default != '') %}
76+
- Default: `{{ opt.default | inspect }}`
77+
{% else %}
78+
- Default: `{{ opt.default }}`
79+
{% endif %}
80+
{% endunless %}
81+
{% if opt.is_value_required %}
82+
- Requires a value
83+
{% elsif opt.accept_value and opt.is_multiple %}
84+
- Accepts multiple values
85+
{% elsif opt.accept_value and opt.is_multiple == false %}
86+
- Accepts a value
87+
{% else %}
88+
- Does not accept a value
89+
{% endif %}
90+
{% endfor %}
8991

9092
{% endunless %}
9193
{% endfor %}

0 commit comments

Comments
 (0)