How do you get composer to install a non-composer package?

后端 未结 2 841
一整个雨季
一整个雨季 2020-12-23 14:25

I am trying to get composer to download the following library from this project, however, it does not have a composer.json file in it so I\'m not sure if this i

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-23 14:47

    As an addition to the answer from @George, regarding the comment from @DavidOliver, here's how you should be able to change the package install target:

    "repositories" : [
        {
            "type"    : "package",
            "package" : {
                "name"    : "vend0r/p4ckage",
                "version" : "dev-master",
                "type"    : "foo-library",
                "dist"    : {
                    "url"  : "https://github.com/vend0r/p4ckage.git",
                    "type" : "vend0r/p4ckage"
                },
                "source"  : {
                    "url"       : "https://github.com/vend0r/p4ckage.git",
                    "type"      : "git",
                    "reference" : "origin/master"
                }
            }
        }
    ]
    ...
    "extra" : {
        "installer-paths" : {
            "libraries/footype" : [
                "type:foo-library"
            ],
        }
    }
    ...
    "require" : {
        "vend0r/p4ckage" : "dev-master"
    }
    

提交回复
热议问题