smartdevs / infinitestack-composer-installer
Requires
- composer-plugin-api: ^1.0
Requires (Dev)
- composer/composer: 1.0.*@dev
- phpunit/phpunit: 4.1.*
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"
}
}