设置composer的软件包安装路径 [英] Setting a package install-path for composer
问题描述
我已经学习了如何在项目侧为作曲家软件包设置自定义安装路径。
I've learned how to set a custom install-path for a composer package on the project side.
"extra": {
"installer-paths": {
"foobar": ["vendor/package"]
}
}
但是,我希望能够在程序包侧为此程序包设置此目录名称,因此在我的软件包存储库中的 composer.json
文件中。在此放置installer-path键不会影响安装目录,并且该软件包已安装在默认的供应商/软件包名称目录中。
However, I want to be able to set this dir name for this package on the package side, so in the composer.json
file within my package repo. Placing the installer-path key there doesn't affect the installation dir and the package is installed in the default vendor/packagename dir.
如何为以下项设置安装路径自己的 composer.json
中的包?
How do you set the install path for a package within its own composer.json
?
推荐答案
通过在软件包 composer.json中的
extra
键中添加安装程序名称
来解决code>文件。
It can be solved by adding installer-name
to the extra
key in the package's composer.json
file.
"extra": {
"installer-name": "foobar",
}
这篇关于设置composer的软件包安装路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!