npm config get [key …]可以获取一项、或几项配置。如果省略掉key,那么跟npm config list命令的效果相同。
例如,获取全局安装路径的前缀,可以运行npm config get prefix:
获取包安装时的缓存路径,可以运行npm config get cache:
获取npm仓库地址,可以运行npm config get registry:
npm config get [key …]可以获取一项、或几项配置。如果省略掉key,那么跟npm config list命令的效果相同。
例如,获取全局安装路径的前缀,可以运行npm config get prefix:
获取包安装时的缓存路径,可以运行npm config get cache:
获取npm仓库地址,可以运行npm config get registry: