I have a javascript app where I have split the code into files in different namespaces, like this:
// file 1: src/Main.js
var Main = function () { ....
// file 2: src/Main/SomethinElse.js
Main.SomethingElse = function () { ....
etc....
The problem with this when minified is when these files are merged the first file has to be always first and then the second one.
Right now I have a bash script that does the compiling, in there I have list of all the files in the proper order, but I have to add every new file into the list after creating it, which does not seem very nice.
Is there any build tool to deal with this or maybe some way to restructure my code in order to avoid this problem ?