smartdevs/infinitestack-composer-installer

此包已被放弃,不再维护。未建议替代包。

安装: 8

依赖者: 1

建议者: 0

安全: 0

类型:composer-plugin

1.0.2 2016-09-21 13:52 UTC

This package is auto-updated.

Last update: 2018-02-06 11:50:18 UTC


README

示例 composer.json 文件

这是一个InfiniteStack蓝图示例,可以通过composer管理。在您的composer.json文件中需要设置的唯一重要部分是"type": "infinitestack-stackformation-component",它描述了您的包是什么,以及"require": { "smartdevs/infinitestack-composer-installer": "~1.0" },它告诉composer加载自定义安装程序。

{
    "name": "you/yourblueorint",
    "type": "infinitestack-stackformation-component",
    "require": {
        "smartdevs/infinitestack-composer-installer": "~1.0"
    }
}

自定义安装路径

如果您正在使用smartdevs/infinitestack-composer-installer的包,您可以在composer.json中使用以下额外设置来覆盖安装路径

{
    "extra": {
        "installer-paths": {
            "stackformation/blueprints/vendor/{$name}/": ["you/yourblueorint", "vendor/package"]
        }
    }
}

包类型可以有自定义安装路径,带有type:前缀。

{
    "extra": {
        "installer-paths": {
             "stackformation/blueprints/vendor/{$name}/": ["type:infinitestack-stackformation-component"]
        }
    }
}

自定义安装名称

如果您是包作者,并且需要您的包在安装时具有不同的名称,请考虑使用installer-name额外设置。

例如,您有一个名为smartdevs/infinitestack-stackformation-component-vpc的包,类型为infinitestack-stackformation-component。使用infinitestack-composer-installer安装将安装到路径blueprints/vendor/infinitestack-stackformation-component-vpc。由于严格的命名约定,您作为包作者实际上需要将包命名为并安装到blueprints/vendor/vpc。在您的package composer.json中使用以下配置将允许这样做

{
    "name": "smartdevs/infinitestack-stackformation-component-vpc",
    "type": "infinitestack-stackformation-component",
    "extra": {
        "installer-name": "vpc"
    }
}