Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bower proxy configuration

Tags:

bower

proxy

is there a way to configure bower not only to use a proxy but ignore the proxy configuration for some domains?

I have the problem, that I will run an internal bower registry for our own developed components. For that repository I would like to ignore the proxy configuration.

like image 860
Johann Sonntagbauer Avatar asked Aug 21 '13 14:08

Johann Sonntagbauer


People also ask

Where is Bowerrc file windows?

bowerrc file located in user's home folder ( %USERPROFILE% ) bowerrc (without the dot) file located in %APPDATA%/bower/config.

How do you add Bower components to a project?

To add a new Bower package to your project you use the install command. This should be passed the name of the package you wish to install. As well as using the package name, you can also install a package by specifying one of the following: A Git endpoint such as git://github.com/components/jquery.git.


2 Answers

Edit your .bowerrc file ( should be next to your bower.json file ) and add the wanted proxy configuration

"proxy":"http://<host>:<port>",
"https-proxy":"http://<host>:<port>"
like image 198
Itsik Avidan Avatar answered Oct 22 '22 13:10

Itsik Avidan


For info, in your .bowerrc file you can add a no-proxy attribute. I don't know since when it is supported but it works on bower 1.7.4

.bowerrc :

{
  "directory": "bower_components", 
  "proxy": "http://yourProxy:yourPort",
  "https-proxy":"http://yourProxy:yourPort",
  "no-proxy":"myserver.mydomain.com"
}

.bowerrc should be located in the root folder of your Javascript project, the folder in which you launch the bower command. You can also have it in your home folder (~/.bowerrc).

like image 55
loicmathieu Avatar answered Oct 22 '22 13:10

loicmathieu