3 ms·
Well, AMD is essentially a CommonJS format, so this is what "people have come up with" for the browsers until real modules show up :) http://wiki.commonjs.org/
by ryanflorence 15y ago
Well, AMD is essentially a CommonJS format, so this is what "people have come up with" for the browsers until real modules show up :)
http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition
- latchkey 15y agoThanks for the pointer, I made sure to read it. What I don't like about it is having to 'define' all the modules that I'm going to use. That is just too error prone. I'd rather just create a CS class in a file and include the entire file when I need to. More similar to the way that an import statement works in Java. For now, as I already mentioned, I'm simulating import style functionality with LabJS, which works great. While not perfect, it allows me to async load everything I need as well as minimize the amount of data on the wire. Here is a description of what I've done... http://lookfirst.com/2011/12/optimizing-your-javascript-delivery.html http://lookfirst.com/2011/12/optimizing-your-javascript-deli...