I have realised that this is not possible because of how the loader currently works.
Now the loader will request a json file containing a list of folders. It will then request to the server a filelist of each folder and using the filelist it will request each individual file.
Due to security reasons JavaScript is not allowed to look at local files, unless in some circumstances, and it cannot list files in folder. Therefore until JavaScript in the browser gets a full-blown File API like in NodeJS, we cannot do much.
Possible fixes:
We could in the json file write out every file we want to be loaded.
Pros: We might have files in some of the folders that we actually do not want the game to load. Using this approach gives us power to choose.
Cons: We will have to maintain this filelist all the time which is far from idea when doing rapid development.
When we get Flow support #6 with a transpiler/transformer to strip type annotations, we can also apply other transformations such as combining all files into one big file. This eases some of the loading. Resource files still have this problem though.
I have realised that this is not possible because of how the loader currently works. Now the loader will request a json file containing a list of folders. It will then request to the server a filelist of each folder and using the filelist it will request each individual file. Due to security reasons JavaScript is not allowed to look at local files, unless in some circumstances, and it cannot list files in folder. Therefore until JavaScript in the browser gets a full-blown File API like in NodeJS, we cannot do much.
Possible fixes: