I used the asp.net mvc 4 in one of my client project. I read the visual studio 2015 documentation, One of the major change is using bower and gulp/grunt in the asp.net mvc 6. I decided to use the bower and gulp in asp.net mvc 4 with visual studio 2012. I am going to discuss about it in this article.
What is bower?
Step 1: Go to the nodejs.org website to download the node and install it in the windows os.
Step 2: Install the bower through node package manager using the following command "npm install -g bower" . -g stands for the global. refer "Figure 1"
Once you installed the bower package through the node package manager. You will find the bower package in your pc, refer "Figure 3".
Create the new asp.net mvc 4 project using the visual studio 2012/2013. Open the newly created project directory and copy the path. refer "Figure 4"
Open the windows command prompt and set the path in the command prompt to the newly created project directory and run the "bower init" command to initialize the bower in your mvc4 project.Once you add the bower in asp.net mvc 4 project, you will find the bower.json file in the root of the project directory, Include the bower.json file in your project. The bower.json file contains the properites and values, which you set while initialize the bower through command prompt. Refer "Figure 5".
To uinstall the bower packages run the following command "bower uninstall jquery --save". Refer "Figure 7".
Useful bower commands:
bower search jquery - search jquery packages in the remote server.
bower install jquery#1.8 --save - install the specific version of the jquery package.
We installed and used the bower in the asp.net mvc 4 project. Read the article "Gulp in ASP.NET MVC4/VISUAL STUDIO 2012" to copy the bower packages scripts and place it into our project scripts directory to use it in our application.
I understand the bower and gulp. Cool Article!