I developed this library for my own needs, starting with the website
MangaConseil.com.
I hereby release it under a
Creative Commons
Attribution license.
Check the demonstration of dynamic script loading using the bezen.org library modules bezen.load and bezen.domwrite and using LABjs and bezen.domwrite, and compare it with static script loading.
Each file is a separate JavaScript component, with dependencies
described in requires comments. This is the format expected by the
Combiner tool by Nicholas C. Zakas,
which allows to pick and group just the parts you need.
You can find an example Ant script file
I wrote to check, combine and compress JavaScript files, that you may
adapt to your own needs.