Tuesday, August 11, 2015

Grunt with Visual Studio

                       Integrating Grunt with Visual Studio

Today I would be showing how to integrate Grunt with visual studio. I found there was no useful article available on the net.
In this example I would be showing how to concat and minify files.
Steps involved :
1. Add new Grunfile.Js

    






2.Add NPM Package.Json
























3. Install Node





4. Install grunt-cli







5. Install NPM packages needed 
//used to concat the files
npm install grunt-contrib-concat --save-dev

//Used for minify
npm install grunt-concat-uglify --save-dev

6. Specify Packages used in Package.Json












7. Specify Taskdetails in Gruntfile.js

8. Add as  post build task in visual studio
Note: For visual studio 2013 and less you can download task manager 
from  Download Task Manager














Based on the need we can keep adding tasks. 

No comments:

Post a Comment