我们正在尝试使用作曲家来处理wordpress网站的依赖关系。我想在这些依赖中包含wordpress本身。我正在尝试将wordpress安装到项目的根目录。所有其他插件等正在安装基于安装程序路径正确..作曲家自定义安装目录 - 根
我已经尝试使用fancyguy/webroot安装程序,但擦拭包安装到 也试过mnsami/composer-custom-目录安装程序,但也抹去目录。
我有一些根目录下的文件,我不想删除 - 比如composer.json,.tfignore和suchlike。
是我必须让它安装到/ vendor然后运行安装后脚本将其移动到我想要的位置的唯一选项?或者是有另一种选择我缺少
这里是一个我试图为根目录,安装
{
"name": "the/name",
"description": "description",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "wordpress",
"type": "webroot",
"version": "4.7.5",
"dist": {
"type": "zip",
"url": "https://github.com/WordPress/WordPress/archive/4.7.5.zip"
},
"require": {
"fancyguy/webroot-installer": "1.0.0"
}
}
}
],
"require-dev": {
"wpackagist-plugin/query-monitor": "2.13.4",
"wordpress": "4.7.5",
"fancyguy/webroot-installer": "1.0.0"
},
"require": {
"wpackagist-plugin/advanced-custom-fields": "4.4.11",
...etc
},
"extra": {
"webroot-dir": ".",
"webroot-package": "wordpress",
"installer-paths": {
"library/plugins/{$name}": [ "type:wordpress-plugin" ]
}
},
"scripts": { ...}
}
这里使用的作曲家,自定义目录安装的composer.json。
{
"name": "the/name",
"description": "description",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "package",
"package": {
"name": "wordpress",
"type": "library",
"version": "4.7.5",
"dist": {
"type": "zip",
"url": "https://github.com/WordPress/WordPress/archive/4.7.5.zip"
}
}
}
],
"require-dev": {
"mnsami/composer-custom-directory-installer": "1.1.*",
"wordpress": "4.7.5"
},
"require": {
"wpackagist-plugin/advanced-custom-fields": "4.4.11",
...etc
},
"extra": {
"installer-paths": {
"library/plugins/{$name}": [ "type:wordpress-plugin" ],
"./": [ "wordpress" ]
}
},
"scripts": { ... }
}