I want to minify java script files in my vs2010 web app ASP.NET solution. I know that YUI compressor can do it pretty well on its own. So I was wondering if I can do the following:
-
I have all JS files in the Scripts folder in my solution.
-
JS files are included into aspx pages as follows:
<script src="Scripts/scripts.js" type="text/javascript"></script>
- It would be nice to minify the ‘scripts.js’ file when building “Release” configuration, as well as when I’m publishing my web app.
Can someone explain here how to automate it all in VS2010?
Microsoft actually has a pretty good solution for this. You can read about it here.