thelia / installer
Thelia 的自定义安装程序。
1.5
2024-08-12 13:48 UTC
Requires
- composer-plugin-api: ^1.0||^2.0
Requires (Dev)
- composer/composer: 1.0.*@dev||2.0.*@dev
README
此安装程序允许您使用 composer 安装模块和模板。我们为 Thelia 创建了特殊的 type。
现在您可以在 packagist.org 创建模块并提交。
特殊类型列表
thelia-module=> 在local/module中安装您的模块thelia-frontoffice-template=> 在templates/frontOffice中安装您的模板thelia-backoffice-template=> 在templates/backOffice中安装您的模板thelia-email-template=> 在templates/email中安装您的模板thelia-pdf-template=> 在templates/pdf中安装您的模板
示例 composer.json 文件
{
"name": "thelia/hooktest-module",
"type": "thelia-module",
"require": {
"thelia/installer": "~1.0"
}
}
这将安装您的模块到 local/modules/hookstest-module
您可能已经注意到 hooktest-module 不是一个有效的 Thelia 模块名称。事实上,packagist.org 不允许大写字母的包。为了解决这个问题,您必须在 composer.json 中使用额外的参数
{
"name": "thelia/hooktest-module",
"type": "thelia-module",
"require": {
"thelia/installer": "~1.0"
},
"extra": {
"installer-name": "HookTest"
}
}
使用这个新部分,您的模块现在将安装在 local/modules/HookTest