發表文章

目前顯示的是 6月, 2015的文章

Config proxy for npm

The npm config files FILES The four relevant files are: per-project config file (/path/to/my/project/.npmrc) per-user config file (~/.npmrc) global config file ($PREFIX/etc/npmrc) npm builtin config file (/path/to/npm/npmrc) Add the following entries in the config file: proxy=http://proxy.company.com:8080 https-proxy=user:password@http://proxy.company.com:8080 npm 6 way for configuration,priority is listed as following order: Config parameter.  --proxy http://server:port   It set proxy to:  http://server:port . Environment variable。 npm_config_ as the prefix for the environment variable will be recognized as the environment parameter for npm. For example, you can set proxy by:  npm_config_proxy=http://server:port . User configuration document. Please enter  npm config get userconfig  to check the user config path。Mac default path for user is $HOME/.npmrc . Global configuration document. Please enter npm config get globalconfig to check the