In composer.json
of the component specify:
type
- type of Magento 2 componentextra/map
- list of files to move and their location relative to the path they will be located in the application
Type: magento2-module
Installation location: app/code
Example:
{
"name": "magento/module-core",
"description": "N/A",
"require": {
...
},
"type": "magento2-module",
"extra": {
"map": [
[
"*",
"Magento/Core"
]
]
}
}
Final location will be <root>/app/code/Magento/Core
Type: magento2-theme
Installation location: app/design
Example:
{
"name": "magento/theme-frontend-plushe",
"description": "N/A",
"require": {
...
},
"type": "magento2-theme",
"extra": {
"map": [
[
"*",
"frontend/Magento/plushe"
]
]
}
}
Final location will be <root>/app/design/frontend/Magento/plushe
Type: magento2-language
Installation location: app/i18n
Example:
{
"name": "magento/language-de_de",
"description": "German (Germany) language",
"require": {
...
},
"type": "magento2-language",
"extra": {
"map": [
[
"*",
"Magento/de_DE"
]
]
}
}
Final location will be <root>/app/i18n/Magento/de_DE
Support for libraries located in lib/internal
instead of vendor
directory.
Installation location: lib/internal
Type: magento2-library
Example:
{
"name": "magento/framework",
"description": "N/A",
"require": {
...
},
"type": "magento2-library",
"extra": {
"map": [
[
"*",
"Magento/Framework"
]
]
}
}
Final location will be <root>/lib/internal/Magento/Framework
Default type, if none is specified.
Installation location: .
(root directory of the code base)
Type: magento2-component
Example:
{
"name": "magento/migration-tool",
"description": "N/A",
"require": {
...
},
"type": "magento2-component",
"extra": {
"map": [
[
"*",
"tools/Magento/Migration"
]
]
}
}
Final location will be <root>/tools/Magento/Migration