1 decade ago by drhayes
It came up in this other thread so I thought I'd post it here as an "official" feature request.
I'll just quote what I wrote over there:
I just wanted to jump into this thread to cast a vote for not re-implementing the wheel: how about the next major version of ImpactJS uses a separate, major module system like RequireJS or, better yet, browserify?
This complicates things in a few ways: it would be backward incompatible with existing 1.x code; it might require a separate build step (browserify doesn't load things dynamically); neither of these tools provide built-in progress events to provide feedback to the user.
It would provide some benefits: both of these tools can load static files and make them available as JS variables; an entire community devoted to solving loading problems in ingenious ways; more standard, modern JS way of doing things.
Both of these tools provide for "baking" and optimizing steps as well.
There are some ancillary benefits: the loaded modules are isolated from each other instead of being JS globals; RequireJS also allows for passing in config information to the module so you could do things like config a module based on what platform it is being built for, web or iOS; etc.
This would also make available nearly every major JS library to our games in an elegant, sustainable way: underscore/lodash, jQuery (although I bet our games don't need much of it), socket.io, etc.
Just something for Dominic to think about, I guess. ( =
I'll just quote what I wrote over there:
I just wanted to jump into this thread to cast a vote for not re-implementing the wheel: how about the next major version of ImpactJS uses a separate, major module system like RequireJS or, better yet, browserify?
This complicates things in a few ways: it would be backward incompatible with existing 1.x code; it might require a separate build step (browserify doesn't load things dynamically); neither of these tools provide built-in progress events to provide feedback to the user.
It would provide some benefits: both of these tools can load static files and make them available as JS variables; an entire community devoted to solving loading problems in ingenious ways; more standard, modern JS way of doing things.
Both of these tools provide for "baking" and optimizing steps as well.
There are some ancillary benefits: the loaded modules are isolated from each other instead of being JS globals; RequireJS also allows for passing in config information to the module so you could do things like config a module based on what platform it is being built for, web or iOS; etc.
This would also make available nearly every major JS library to our games in an elegant, sustainable way: underscore/lodash, jQuery (although I bet our games don't need much of it), socket.io, etc.
Just something for Dominic to think about, I guess. ( =