Here are the relevant docs on the subject:
https://docs.npmjs.com/cli/config
It looks like these are equivalent:
npm config set foo bar
npm set -g foo bar
so I figured that if I run npm set
without the -g switch, then it would update my local .npmrc file:
npm set foo bar
but npm set
w/o the -g flag did not update my local .npmrc file. So what the hell is the difference between npm set
and npm config set
, and what is the -g flag for?