我想將https://github.com/timrwood/moment放入我的composer.json以便於維護。如何將composer與包含packages.json的非packagist github項目一起使用
這不是一個官方的packagist項目(當然,因爲它不是PHP),但它包含一個用於nodejs的packages.json
。我可以在我的composer.json
中使用這個嗎?
我想這一點,但沒有奏效:
{
"repositories": {
"timrwood/moment": {
"type": "git",
"url": "git://github.com/timrwood/moment.git"
}
}
}
它拋出一個錯誤信息,說「沒有有效的composer.json在任何分支或混帳的標籤發現://github.com /timrwood/moment.git,無法從中加載軟件包。「
而且它缺少版本字符串來定義我想使用的版本...
誰能幫助嗎?
或者我不應該在這裏使用作曲家因爲我混合JS和PHP?
你看過Satis嗎? https://github.com/composer/satis和http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md –
還沒有嘗試過,謝謝你的提示!我會試一試。 – acme
當前作曲家版本允許手動添加'composer.json':http://getcomposer.org/doc/04-schema.md#repositories – Tgr