Does what it says on the tin! Note that for the benefit of diffing and more focused changes, we've been extremely minimal with code changes. Highlights:
Each "module" of client code, corresponding to one entry in hsmusicClientInfo, is now in its own file, under static/js/client.
We bring together all modules in static/js/client/index.js. Notably we do change the order in which modules are evaluated (previously it was arbitrary; now it's alphabetical), but from the start we've structured code not to run into any problems to do with run order. (This is basically why modules are broken into different steps in the first place, apart from code navigability.)
Modules no longer run initInfo — instead the exported info object is mutated/configured in-place (by index.js).
Modules no longer push onto particular arrays in clientSteps — instead the corresponding exported names are added to clientSteps by index.js.
Modules may depend on each other in whatever fashion, courtesy JavaScript's live bindings (and circular import) — all logic already belongs in particular functions, so everything is processed and ready when that logic is actually evaluated.
A handful of code chunks are either unused or still not updated to clientSteps (now client module) style. These are moved into their own files too, but kept outside of static/js/client (so the only files in there are client modules and index.js).
As far as we could gather, all modules are behaving as intended. If anything is too broken, we'll hopefully figure that out sooner than later!!
Does what it says on the tin! Note that for the benefit of diffing and more focused changes, we've been extremely minimal with code changes. Highlights:
hsmusicClientInfo
, is now in its own file, understatic/js/client
.static/js/client/index.js
. Notably we do change the order in which modules are evaluated (previously it was arbitrary; now it's alphabetical), but from the start we've structured code not to run into any problems to do with run order. (This is basically why modules are broken into different steps in the first place, apart from code navigability.)initInfo
— instead the exportedinfo
object is mutated/configured in-place (byindex.js
).clientSteps
— instead the corresponding exported names are added toclientSteps
byindex.js
.static/js/client
(so the only files in there are client modules andindex.js
).As far as we could gather, all modules are behaving as intended. If anything is too broken, we'll hopefully figure that out sooner than later!!