在哪里可以找到作曲家的全球套餐? [英] Where to find composer's global packages?
问题描述
对于Sublime Text插件,我需要在全局安装Composer软件包。
For a plugin for Sublime Text I was required to install a composer package globally.
为此,我必须运行以下命令:
In order to do this I had to run the following command:
composer global require "asm89/twig-lint" "@stable"
安装开始运行,几秒钟后安装了软件包。瞧!嗯,不是真的。
The installation started running and a few seconds later the package was installed. Voila! Well, not really.
第二步是在我的Sublime Text配置文件中添加一些行:
Step two was to add some lines to my Sublime Text configuration file:
{
"user": {
"paths": {
"windows": ["C:\\Users\\yourname\\.composer\\vendor\\bin"]
},
}
}
但是,该插件无法正常工作。因此,我决定检查路径。而且我的个人资料目录中似乎没有 .composer
目录。它也不在我的 php
目录中。而且我在任何地方都找不到它。
However, the plugin is not working. So I decided to check the path. And it appears there is no .composer
directory in my profile directory. It isn't in my php
directory either. And I can't find it anywhere.
我想知道是否可以找到此目录,并且希望您有任何建议可以帮助我将此插件添加到
I would like to know if there's a way to locate this directory and would appreciate any suggestions that can help me get this plugin to work.
推荐答案
您可以查询Composer以查找它在何处设置了用户 $ COMPOSER_HOME
目录。
You can query Composer to find where it has set the user $COMPOSER_HOME
directory.
composer config --list --global
[home]行是指默认值 $ COMPOSER_HOME
。
The '[home]' line refers to the default value of $COMPOSER_HOME
.
作为最终确认-配置中的您的姓名部分,很可能需要使用您自己的Windows用户名进行更新- composer config
会说出将文件放在何处。
Just as a final confirmation - the 'yourname' part in the configuration, would very likely need to be updated with your own Windows username - composer config
will say where it put the files.
这篇关于在哪里可以找到作曲家的全球套餐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!