I have JavaScript code split into several files, all using a module template (updating one global variable, like MyApp, with new features and members.
Is it possible to minimize files in one, and not spoil the area
Example. I want to reduce:
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 || {});
source share