我试图在NPM中查找有关环境优先级的文档,但没有找到
假设我有
1. global npmrc
2. local npmrc n my folder
3. environment variable ( I didn't saw in default how it could create ) ?
NPM的外观应该是什么顺序?
我可以有更多选择吗?
当我运行$ npm set key value
时,我看到它已更新为userconfig
当我运行export npm_config_foo=bar
时,我看到了
我也做了npm config list
,我看到创建了环境配置
有什么不同?
;
**cli configs**
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.6.0 node/v8.11.3 win32 x64"
; **userconfig** C:\Users\myuser\.npmrc
https-proxy = null
package-lock = false
proxy = null
strict-ssl = false
; builtin config undefined
prefix = "C:\\Users\\myuser\\AppData\\Roaming\\npm"
; node bin location = C:\program files\nodejs\node.exe
; cwd = C:\dev\repo\proto1
; HOME = C:\Users\myuser
cli配置值从哪里检索? userconfig值从哪里检索? 内置配置未定义值从哪里检索?