Desktop Javascript inheritance compiler?
<p>Wondering if anyone if there is a desktop JS compiler out there that does for JS what the desktop Less application does for CSS. Ideally you would be able to "import" a script at the top of the document and write extended code for it. Upon saving this compiler would combine the two files into a single source file to a new output file. An example:</p>

<p>File foo.js:</p>

<pre><code> var Foo = function() {};
 Foo.prototype.doSomething = function(){alert('doing stuff...');};
</code></pre>

<p>File foo_plus.js:</p>

<pre><code> @import 'foo.js';
 Foo.prototype.doSomethingElse = function(){alert('doing other stuff...');};
</code></pre>

<p>Now upon saving, the compiler is replacing the statement "<code>@import 'foo.js';</code>" with</p>

<pre><code>var Foo = function() {};
Foo.prototype.doSomething = function(){alert('doing stuff...');};
</code></pre>

<p>then adding:</p>

<pre><code>Foo.prototype.doSomethingElse = function(){alert('doing other stuff...');};
</code></pre>

<p>and saving this to a chosen location and name.</p>

<p>Ideally, this would be a desktop compiler like the Less application that listens to changes on the file and compiles accordingly.</p>
