如何在composer.phar中为某些必需的软件包设置安装路径?

时间:2019-01-02 12:52:20

标签: php composer-php ckeditor typo3-8.x ckeditor4.x

我已经为TYPO3 CMS 8设置了一个需求列表,并希望添加ck编辑器以用于常规用途(也在扩展程序中)。

...

"require": {
    "helhum/typo3-console": "^4.9.3 || ^5.2",
    "typo3/cms-about": "^8.7.10",
    "typo3/cms-belog": "^8.7.10",
    "typo3/cms-beuser": "^8.7.10",
    "typo3/cms-context-help": "^8.7.10",
    "typo3/cms-documentation": "^8.7.10",
    "typo3/cms-felogin": "^8.7.10",
    "typo3/cms-fluid-styled-content": "^8.7.10",
    "typo3/cms-form": "^8.7.10",
    "typo3/cms-func": "^8.7.10",
    "typo3/cms-impexp": "^8.7.10",
    "typo3/cms-info": "^8.7.10",
    "typo3/cms-info-pagetsconfig": "^8.7.10",
    "typo3/cms-rte-ckeditor": "^8.7.10",
    "typo3/cms-setup": "^8.7.10",
    "typo3/cms-sys-note": "^8.7.10",
    "typo3/cms-t3editor": "^8.7.10",
    "typo3/cms-tstemplate": "^8.7.10",
    "typo3/cms-viewpage": "^8.7.10",
    "typo3/cms-wizard-crpages": "^8.7.10",
    "typo3/cms-wizard-sortpages": "^8.7.10",
    "typo3-ter/extension-builder": "^8.10.2",
    "typo3-ter/realurl": "^2.4.0",
    "ckeditor/ckeditor": "4.*"
},

...

"extra": {
        "typo3/cms": {
            "web-dir": "public"
        },
        "helhum/typo3-console": {
            "comment": "This option is not needed ay more for helhum/typo3-console 5.x",
            "install-extension-dummy": false
        }
},

...

如何将ckeditor软件包的安装路径更改为例如/public/vendor/路径,而不是常规的/vendor路径?我需要这样做是因为我的Apache直接植根于/public文件夹。

2 个答案:

答案 0 :(得分:0)

我正在使用符号链接将vendor/ckeditor/ckeditor放入我的TYPO3 CMS扩展名中,例如resources/public/ckeditor

答案 1 :(得分:-2)

为什么不将所有供应商公开/出售?

供应商目录

默认为供应商。您可以将依赖项安装到其他 目录(如果需要)。 $ HOME和〜将替换为您的家 供应商目录和下面所有* -dir选项中的目录路径。

https://getcomposer.org/doc/06-config.md#vendor-dir