Closed guifromrio closed 11 years ago
Have you looked at LABjs? curl.js is an AMD and CJS module loader. it has some features to help load legacy javascript files, but it's probably not going to be your best solution if you want to continue to use non-modular javascript. :)
Closing this issue. If you change your mind and want to switch over to AMD or CJS, please re-open. :)
Actually, I found a "solution" (hack) which is a good enough compromise for me:
window.escapeDefine = window.define
curl(config)
.next(css)
.then(-> window.define = undefined)
.next(lib)
.then(-> window.define = window.escapeDefine)
.next(templates)
.then(templatesCallback, errorCallback)
Just thought I should share for anyone with similar needs.
Hey.
Thanks for the wonderful plugin, first of all.
So, I realize I'm using it in a really unordinary fashion, but by many reasons I really need the resource-loading capabilities of curl, without the AMD module features (!).
What I'm trying to do is including lots of libs, for example:
and afterwards
However, I would only like KO, Radio and jQuery to export their normal global variables!
This cannot be achieved because an error pops about "multiple anonymous defines".
How can I achieve what I want, i.e., ignoring they are "AMD compliant" and just have them behave "normally"?
Thanks for any help