bkief29/pcomposer
Composer 安装命令:
composer require bkief29/pcomposer
包简介
A composer plugin to provide the ability to share and reuse packages across the system.
README 文档
README
Based on the ideology of pnpm to reduce and reuse shared packages.
Install
composer global require bkief29/pcomposer
Setup
Modify your ~/.composer/config.json to include the following:
Replace
%MY_USER%with your user, or specify a custom path forvendor-dir
{
"config": {
"allow-plugins": {
"bkief29/pcomposer": true
},
"extra" : {
"shared-package": {
"vendor-dir": "/Users/%MY_USER%/.composer/pcomposer",
"symlink-dir": "vendor",
"symlink-enabled": true,
"package-list": [
"*"
]
}
}
}
}
Options
Exclude packages from being symlinked
In your project's composer.json:
"config": { "extra" : { "pcomposer": { "exclude": [ "spatie/data-transfer-object" ] } } },
Extras
Migrate to pcomposer for all of your projects
Usage:
pcomposer ~/projects
function pcomposer() { find $1 -type d \( -name "vendor" \) -maxdepth 2 -print0 | while read -d $'\0' file do echo "$file" cd "$file/../" && composer install done }
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-05-17