addictedtomagento/magento2-composer-installer

Magento 2 的 Composer 安装器

1.0.0-alpha01 2015-09-18 15:48 UTC

This package is auto-updated.

Last update: 2024-09-20 00:42:28 UTC


README

Build Status Scrutinizer Code Quality

使用方法

在组件的 composer.json 中指定

  • type - Magento 2 组件类型
  • extra/map - 要移动的文件列表及其相对于目标路径的位置

支持组件

Magento 模块

类型: magento2-module

安装位置: app/code

示例

{
    "name": "magento/module-core",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-module",
    "extra": {
        "map": [
            [
                "*",
                "Magento/Core"
            ]
        ]
    }
}

最终位置将是 <root>/app/code/Magento/Core

Magento 主题

类型: magento2-theme

安装位置: app/design

示例

{
    "name": "magento/theme-frontend-plushe",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-theme",
    "extra": {
        "map": [
            [
                "*",
                "frontend/Magento/plushe"
            ]
        ]
    }
}

最终位置将是 <root>/app/design/frontend/Magento/plushe

Magento 语言包

类型: magento2-language

安装位置: app/i18n

示例

{
    "name": "magento/language-de_de",
    "description": "German (Germany) language",
    "require": {
        ...
    },
    "type": "magento2-language",
    "extra": {
        "map": [
            [
                "*",
                "Magento/de_DE"
            ]
        ]
    }
}

最终位置将是 <root>/app/i18n/Magento/de_DE

Magento 库

支持位于 lib/internal 而不是 vendor 目录的库。

安装位置: lib/internal

类型: magento2-library

示例

{
    "name": "magento/framework",
    "description": "N/A",
    "require": {
       ...
    },
    "type": "magento2-library",
    "extra": {
        "map": [
            [
                "*",
                "Magento/Framework"
            ]
        ]
    }
}

最终位置将是 <root>/lib/internal/Magento/Framework

Magento 组件

默认类型,如果未指定。

安装位置: . (代码库的根目录)

类型: magento2-component

示例

{
    "name": "magento/migration-tool",
    "description": "N/A",
    "require": {
        ...
    },
    "type": "magento2-component",
    "extra": {
        "map": [
            [
                "*",
                "tools/Magento/Migration"
            ]
        ]
    }
}

最终位置将是 <root>/tools/Magento/Migration