Bower is very popular to manage client script package, here is the steps to set it up to use it in visual studio 2013.
1. Open package management console and search bower (not bower.js), install it.
After it is installed, you should be able to open a command prompt and go to your visual studio project folder, then run "bower install <package>" from there.
2. By default, Bower installed the package into a folder called bower_components under the project folder. Usually we want to manage the packages better and put them under scripts/lib folder.
To do this, create a file named the .bowerrc and add the line,
{
"Directory":"Scripts/lib",
}
This will install all the packages into the scripts/lib folder. By default, windows doesn't allow you create a file starts with period (.), then you can create any temp text file and rename it in the command window.
3. If the visual studio runs internally behind a firewall, you need to set up the proxy for both Bower and Node.
In the .bowerrc file, add the line,
"https-proxy": "http://<domain>%5C<user>:<passsword>@<proxy_server>:<proxy_port>/"
Edit the node.cmd under .bin folder to add the lines,
SET HTTP_PROXY=http://1:1@192.168.11.22:8080
SET HTTPS_PROXY=http://1:1@192.168.11.22:8080
No comments:
Post a Comment