Developing with unminified javascript files before the release
<p>This problem is so simple and common but I still haven't been able to find a good solution for it. So I thought maybe some experts here in Stackoverflow can guide me about the best practices.</p>

<p>Let's say I have a several Javascript modules and put each of them in a separate file:</p>

<pre><code>a.js
b.js
c.js
d.js
</code></pre>

<p>When releasing the software, I join them together and minify them:</p>

<pre><code>//pseudo command:
cat a.js b.js c.js d.js | minify &gt; all.js
</code></pre>

<p>Then I include reference to all.js in my html files like this:</p>

<pre><code>&lt;script src="all.js"&gt;&lt;/script&gt;
</code></pre>

<p>So far so good. The problem is that when developing the software, I want to see the files as unminified and uncombined. One solution is to eliminate the minification from the process and do it like:</p>

<pre><code>//pseudo command:
cat a.js b.js c.js d.js &gt; all.js
</code></pre>

<p>and include it with the <code>&lt;script&gt;</code> tag. This works but I rather want to have the files included separately. So I have to do this in my html files:</p>

<pre><code>&lt;script src="a.js"&gt;&lt;/script&gt;
&lt;script src="b.js"&gt;&lt;/script&gt;
&lt;script src="c.js"&gt;&lt;/script&gt;
&lt;script src="d.js"&gt;&lt;/script&gt;
</code></pre>

<p>This one works as I intended but then when releasing the code I have to go through all my html files and replace those 4 <code>&lt;script&gt;</code> tags with <code>&lt;script src="all.js"&gt;&lt;/script&gt;</code> and that is too much work for my project because there are many html files and we have debug/release cycles regularly.</p>

<p>One solution can be to have the script tag for all the files:</p>

<pre><code>&lt;script src="a.js"&gt;&lt;/script&gt;
&lt;script src="b.js"&gt;&lt;/script&gt;
&lt;script src="c.js"&gt;&lt;/script&gt;
&lt;script src="d.js"&gt;&lt;/script&gt;
&lt;script src="all.js"&gt;&lt;/script&gt;
</code></pre>

<p>But this results to 4 erroneous requests at runtime. (because only all.js is available at release time).</p>

<p>How would you solve this problem?</p>
