永久添加 bower 代理
Permanently add bower proxy
如何将 Bower 代理永久添加到我的系统中,这样我就不必为每个项目编辑 .bowerrc 文件并添加
{
"proxy":"http://<proxy>:<port>",
"https-proxy":"https://<proxy>:<port>",
}
我已将代理添加到我的 OS 中:
export HTTP_PROXY=http://<proxy_url>:<port>
export HTTPS_PROXY=http://<proxy_url>:<port>
但 seams bower 不明白。预先感谢您的回复
将 .bowerrc
文件放入您的主文件夹(它也适用于 Windows)。
来自http://bower.io/docs/config/:
Placement & Order
The config is obtained by merging multiple configurations by this
order of importance:
- CLI arguments via --config
- Environment variables
- Local .bowerrc located in the current working directory
- All .bowerrc files upwards the directory tree
- .bowerrc file located in user’s home folder (~)
- .bowerrc file located in the global folder (/)
Example of CLI arguments:
- --config.endpoint-parser=
- --config.storage.cache=
Example of valid environment variables:
- bower_endpoint_parser is evaluated as endpoint-parser
- bower_storage__cache is evaluated as storage.cache
如何将 Bower 代理永久添加到我的系统中,这样我就不必为每个项目编辑 .bowerrc 文件并添加
{
"proxy":"http://<proxy>:<port>",
"https-proxy":"https://<proxy>:<port>",
}
我已将代理添加到我的 OS 中:
export HTTP_PROXY=http://<proxy_url>:<port>
export HTTPS_PROXY=http://<proxy_url>:<port>
但 seams bower 不明白。预先感谢您的回复
将 .bowerrc
文件放入您的主文件夹(它也适用于 Windows)。
来自http://bower.io/docs/config/:
Placement & Order
The config is obtained by merging multiple configurations by this order of importance:
- CLI arguments via --config
- Environment variables
- Local .bowerrc located in the current working directory
- All .bowerrc files upwards the directory tree
- .bowerrc file located in user’s home folder (~)
- .bowerrc file located in the global folder (/)
Example of CLI arguments:
- --config.endpoint-parser=
- --config.storage.cache=
Example of valid environment variables:
- bower_endpoint_parser is evaluated as endpoint-parser
- bower_storage__cache is evaluated as storage.cache