Good way to output javascript selectively depending on Application settings
<p>I am developing a site which includes several different javascript files and libraries. For optimization purposes I have implemented <a href="http://yuicompressor.codeplex.com" rel="nofollow">YUI Compressor for .Net</a></p>

<p>This will minimize and combine my javascript files into one single file.</p>

<p>Now I have put this up in a MSBuild script that automatically does the compression and minimization and outputs it to a file of my choosing. However, I still wish to keep the original javascript files in my development environment. My question is simply:</p>

<p>Is there a good way to depending on the Debug setting for example choose which javascript to use? This to not have to change the MasterPage by hand each time I release the build.</p>

<p>Allow me to illustrate.</p>

<p>If I am running in Debug="true" I wish my MasterPage to include the following javascripts:</p>

<pre><code>&lt;script type="text/javascript" src="first.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="second.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="third.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="fourth.js"&gt;&lt;/script&gt;
</code></pre>

<p>If I am running in Debug="false" I wish this to be outputted in the MasterPage:</p>

<pre><code>&lt;script type="text/javascript" src="compressedAndMinimized.js"&gt;&lt;/script&gt;
</code></pre>

<p>Is there an elegant solution to this that I am missing here?</p>
