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

Add a note about autogenerated content editing to CLI reference #5268

Merged
merged 5 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions _includes/mrg/note.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<div class="bs-callout bs-callout-info" markdown="1">
{: .bs-callout-info }
This topic is generated automatically from the corresponding README in the Magento codebase.
If you want to contribute, refer to [Magento Code Contributions]({{ page.baseurl] }}/contributor-guide/contributing.html).
</div>
114 changes: 58 additions & 56 deletions _includes/reference/cli-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,80 +12,82 @@ The initial list is auto generated using the `{{ tool }} list` command at the {{

{{ intro }}

## Reference

{: .bs-callout-info }
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).

{% for command in commands %}
{% assign arguments = command.definition.arguments %}
{% assign options = command.definition.options %}

## `{{ command.name }}`
### `{{ command.name }}`

{{ command.description }}

```bash
{{ tool }} {{ command.usage }}
```

{% unless arguments.size == 0 %}
{% unless arguments.size == 0 %}

### Arguments
{: .no_toc}
#### Arguments

{% for argument in arguments %}
{% for argument in arguments %}
{% for item in argument %}
{% if item.name %}

{% if item.default == empty %}
{% endif %}

#### `{{ item.name }}`

- Description: {{ item.description }}
{% unless item.default == nil %}
{% if item.default == false or (item.default == empty and item.default != '') %}
- Default: `{{ item.default | inspect }}`
{% else %}
- Default: `{{ item.default }}`
{% endif %}
{% endunless %}
{% if item.is_required %}
- Required
{% endif %}
{% if item.is_array %}
- Array
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}

### Options
{: .no_toc}
{% if item.name %}
{% if item.default == empty %}
{% endif %}

##### `{{ item.name }}`

- Description: {{ item.description }}
{% unless item.default == nil %}
{% if item.default == false or (item.default == empty and item.default != '') %}
- Default: `{{ item.default | inspect }}`
{% else %}
- Default: `{{ item.default }}`
{% endif %}
{% endunless %}
{% if item.is_required %}
- Required
{% endif %}
{% if item.is_array %}
- Array
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}

#### Options

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

#### {{ option[0] }}

- Option: `{{ opt.name }}`
{% if opt.shortcut contains '-' %}
- Shortcut: `{{ opt.shortcut }}`
{% endif %}
- Description: {{ opt.description }}
{% unless opt.default == nil %}
{% if opt.default == false or (opt.default == empty and opt.default != '') %}
- Default: `{{ opt.default | inspect }}`
{% else %}
- Default: `{{ opt.default }}`
{% endif %}
{% endunless %}
{% if opt.is_value_required %}
- Requires a value
{% elsif opt.accept_value and opt.is_multiple %}
- Accepts multiple values
{% elsif opt.accept_value and opt.is_multiple == false %}
- Accepts a value
{% else %}
- Does not accept a value
{% endif %}
{% endfor %}
##### `{{ option[0] }}`

- Option: `{{ opt.name }}`
{% if opt.shortcut contains '-' %}
- Shortcut: `{{ opt.shortcut }}`
{% endif %}
- Description: {{ opt.description }}
{% unless opt.default == nil %}
{% if opt.default == false or (opt.default == empty and opt.default != '') %}
- Default: `{{ opt.default | inspect }}`
{% else %}
- Default: `{{ opt.default }}`
{% endif %}
{% endunless %}
{% if opt.is_value_required %}
- Requires a value
{% elsif opt.accept_value and opt.is_multiple %}
- Accepts multiple values
{% elsif opt.accept_value and opt.is_multiple == false %}
- Accepts a value
{% else %}
- Does not accept a value
{% endif %}
{% endfor %}

{% endunless %}
{% endfor %}