title: How can I automatically compress and minimize JavaScript files in an ASP.NET MVC app?
body: <p>So I have an ASP.NET MVC app that references a number of javascript files in various places (in the site master and additional references in several views as well).  </p>
  
  <p>I'd like to know if there is an automated way for compressing and minimizing such references into a single .js file where possible.  Such that this ...</p>
  
  <pre><code>&lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/Ext.ux.grid.GridSummary/Ext.ux.grid.GridSummary.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/ext.ux.rating/ext.ux.ratingplugin.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/ext-starslider/ext-starslider.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/ext.ux.dollarfield.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/ext.ux.combobox.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/ext.ux.datepickerplus/ext.ux.datepickerplus-min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/SessionProvider.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ExtJS/TabCloseMenu.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ActivityViewer/ActivityForm.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ActivityViewer/UserForm.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ActivityViewer/SwappedGrid.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/ActivityViewer/Tree.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>... could be reduced to something like this ...</p>
  
  <pre><code>&lt;script src="&lt;%= ResolveUrl("~") %&gt;Content/MyViewPage-min.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Thanks</p>