Composer - specify `composer.json` path

谁说我不能喝 提交于 2019-12-08 16:29:16

问题


Is it possible to specify the path to the composer.json file using the cli commands? Even better, is it possible to user a file with a different name?


回答1:


I would suggest you take a look at this: https://getcomposer.org/doc/03-cli.md#environment-variables

COMPOSER

By setting the COMPOSER env variable it is possible to set the filename of composer.json to something else.

For example:

COMPOSER=composer-other.json php composer.phar install

The generated lock file will use the same name: composer-other.lock in this example.



来源:https://stackoverflow.com/questions/38745000/composer-specify-composer-json-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!