我已经能够安装没有 composer.json 文件的存储库,如下所示:
{
"type": "package",
"package": {
"name": "yahoo/yui-compressor",
"version": "2.0.4",
"dist": {
"url": "http://yui.zenfs.com/releases/yuicompressor/yuicompressor-2.4.7.zip",
"type": "zip"
}
}
},
我从文档中获取了 "type": "zip" 部分,但我找不到许多其他类型。例如,我需要安装 jQuery,但我不知道在 type 中输入什么(“js”不起作用)。
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.7.2",
"dist": {
"url": "http://code.jquery.com/jquery-1.7.2.js",
"type": "js"
}
}
}
有任何想法吗?
编辑:我正在添加完整的解决方案来帮助@CMCDragonkai:
"require": {
"vendorname/somefile": "1.2.3",
},
"repositories": [
{
"type": "package",
"package": {
"name": "vendorname/somefile",
"version": "1.2.3",
"dist": {
"url": "http://example.com/somefile.txt",
"type": "file"
}
}
}
]