Of course it’s not a difficult problem and really once you realize what your problem is it’s a Simple Matter of Programming. So when I stopped for gas, energy drinks, and gas at the Tallulah Travel Center in Louisiana I went ahead and implemented my solution. I didn’t write docs, but I wrote tests and the basic API that hasn’t changed and has served me well so far. So here it is:
Using JSDM is easy
The return value from file_list_for_provisions is an ordered list of files that provide the requested provisions, as well as all of the provisions’ dependencies, recursively. Basically it gives you a list of files you can load on the page and make it work.
This may seem like overkill compared to, say, a manifest of JS files to load, but once you use it it’s so much nicer due to automatically handling of load order and whatnot.Posted Mon, May 28, 2012