8
I have my JavaScript code split into few files, all using the module pattern (updating one global variable, say MyApp, with new features and members.
Will it be possible to minify the files into one and not spoiling the scopes
Example I want to minify:
File1.js
var Module = (function(ns) {
ns.fun1 = function() { alert('fun1'); };
return ns;
})(Module || {});
File2.js
var Module = (function(ns) {
ns.fun2 = function() { alert('fun2'); };
return ns;
})(Module || {});