pnpm config
Aliases: c
管理配置文件。
The configuration files are in INI
format.
The local configuration file is located in the root of the project and is named .npmrc
.
全局配置文件位于以下位置之一:
- If the $XDG_CONFIG_HOME env variable is set, then $XDG_CONFIG_HOME/pnpm/rc
- On Windows: ~/AppData/Local/pnpm/config/rc
- On macOS: ~/Library/Preferences/pnpm/rc
- On Linux: ~/.config/pnpm/rc
命令行
set <key> <value>
设置config中提供的key,和相对应的value
get <key>
打印config中提供的key对应的value
delete <key>
从config文件中删除配置过的key。
list
显示所有config的设置。
配置项
--global, -g
在全局配置文件中设置配置项。
--location
When set to project
, the .npmrc
file at the nearest package.json
will be used.
When set to global
, the performance is the same as setting the --global
option.
--json
以JSON格式显示所有的配置设置。