我們正在嘗試使用作曲家來處理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": { ... }
}