Composer安装包在其他目录中

时间:2014-12-13 18:04:50

标签: composer-php

我有以下composer.json:

    {
    "name": "fuel/fuel",
    "type": "metapackage",
    "description": "The FuelPHP framework",
    "keywords": ["framework"],
    "homepage": "http://fuelphp.com",
    "license": "MIT",
    "authors": [
        {
            "name": "FuelPHP Development Team",
            "email": "team@fuelphp.com"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "monolog/monolog": "1.5.*",
        "fuelphp/upload": "2.0.1",
        "twig/twig": "1.15.1",
        "vesselinv/fuel-sprockets": "1.0.x-dev"
    },
    "config": {
        "vendor-dir": "vendor"
    },
    "scripts": {
        "post-install-cmd": [
            "php oil r install"
        ]
    },
    "minimum-stability": "dev"
}

我的问题是,作曲家自动将链轮包安装到/ fuel / packages / sprockets,但是我已经稍微改变了框架结构,所以我的"包"目录在/ packages /下。如何更改此作曲家行为?

我只需要#34; vesselinv / fuel-sprockets"!

1 个答案:

答案 0 :(得分:0)

vendor-dir下的config更改为packages

Doc

  

vendor-dir :默认为供应商。如果需要,可以将依赖项安装到其他目​​录中。

https://stackoverflow.com/a/27735674/2486953

上查看我的回答