|
1 | 1 | <div markdown="1">
|
2 | 2 |
|
3 |
| -### Root directory |
4 |
| -We refer to a component's *root directory* as the top-level directory in which you develop component code. Typically, this directory is located in one of the following directories relative to the Magento root directory: |
| 3 | +### Root directory location |
| 4 | +A component's root directory is the top-level directory for that component under which its folders and files are located. Depending on how your Magento development environment was installed, your component's root directory can be located in two places: |
5 | 5 |
|
6 |
| -* Subdirectory of `app` (*recommended*.) : |
| 6 | +* `<Magento install directory>/app`: This is the *recommended* location for component development. You can easily set up this type of environment by [Cloning the Magento 2 GitHub repository]({{ site.gdeurl21 }}install-gde/prereq/dev_install.html). |
7 | 7 |
|
8 |
| - * For modules, use `app/code` |
9 |
| - * For themes, use `app/design/frontend` (storefront theme) or `app/design/adminhtml` (Magento Admin theme) |
10 |
| - * For language packages, use `app/i18n` |
| 8 | + * For modules, use `app/code`. |
| 9 | + * For storefront themes, use `app/design/frontend`. |
| 10 | + * For Admin themes, use `app/design/adminhtml`. |
| 11 | + * For language packages, use `app/i18n`. |
11 | 12 |
|
12 |
| - You can easily set up this type of environment by <a href="{{ site.gdeurl21 }}install-gde/prereq/dev_install.html">cloning the Magento 2 GitHub repository</a>. Typically, you cloned the repository if you want to to contribute code to the Magento 2 codebase. |
13 |
| -* `vendor`: You get this directory structure if you used the <a href="{{ site.gdeurl21 }}install-gde/prereq/integrator_install.html">`composer create-project`</a> command to get a Magento 2 metapackage (which downloads the CE or EE code), or if you extracted a <a href="{{ site.gdeurl21 }}install-gde/prereq/zip_install.html">compressed Magento 2 archive</a>. |
| 13 | +* `<Magento install directory>/vendor`: This location is found in the alternative setups where the [`composer create-project`]({{ site.gdeurl21 }}install-gde/prereq/integrator_install.html) command was used to get a Magento 2 metapackage (which downloads the CE or EE code), or a [compressed Magento 2 archive]({{ site.gdeurl21 }}install-gde/prereq/zip_install.html) was extracted in order to install Magento. *We do not recommend developing components using this setup*. |
14 | 14 |
|
15 | 15 | ### Required files
|
16 |
| -The following are required for all components: |
| 16 | +The following files are required for all components: |
17 | 17 |
|
18 |
| -* `registration.php`: Among other things, specifies the directory in which the component is installed; by default, components install in the `<Magento root dir>/vendor` directory. For more information, see <a href="{{ site.gdeurl21 }}extension-dev-guide/component-registration.html" target="_blank">Component registration</a>. |
19 |
| -* `composer.json`: Specifies component dependencies. For more information, see <a href="{{ site.gdeurl21 }}extension-dev-guide/composer-integration.html" target="_blank">Composer integration</a>. |
| 18 | +* `registration.php`: Among other things, this file specifies the directory in which the component is installed by vendors in production environments. By default, composer automatically installs components in the `<Magento root dir>/vendor` directory. For more information, see [Component registration]({{ site.gdeurl21 }}extension-dev-guide/component-registration.html). |
| 19 | +* `composer.json`: Specifies component dependencies and other metadata. For more information, see [Composer integration]({{ site.gdeurl21 }}extension-dev-guide/composer-integration.html). |
0 commit comments