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:
File foo.js:
var Foo = function() {};
Foo.prototype.doSomething = function(){alert('doing stuff...');};
File foo_plus.js:
@import 'foo.js';
Foo.prototype.doSomethingElse = function(){alert('doing other stuff...');};
Now upon saving, the compiler is replacing the statement "@import 'foo.js';" with
var Foo = function() {};
Foo.prototype.doSomething = function(){alert('doing stuff...');};
then adding:
Foo.prototype.doSomethingElse = function(){alert('doing other stuff...');};
and saving this to a chosen location and name.
Ideally, this would be a desktop compiler like the Less application that listens to changes on the file and compiles accordingly.