promethify
promethify copied to clipboard
Can this help me load google maps api with browserify without adding it via script tag.
First off I may have a little search keyword / discourse issue. I know that browserify and node's require load dependancies sync. I wanna load a module async, but its an actual file online. So wanna grab it every time it loads. Can your project do that?
cross issue? thlorenz/bromote#4
So I just put out both of these repos (see below) the requirejs one is solid, I just started working with browserify tonight and I'm rather excited. Right now the browserify one is cheating because google maps is being loaded via script tag, this is also bad philosophically because there's no certainty that browserify has it when it needs it.
@johnkpaul @thlorenz can either of you're projects help me?
@toddself may be able to help here since he loaded google maps with bromote afaik.
Wow, you're up early for brooklyn.
promethify can load a module async, but it does make the assumption that it only needs to be loaded once and then caches it for future requests. It is currently intended to be used with your own modules and not third parties.
I would be looking to @thlorenz's bromote for this functionality. I have the exact same philosophical feelings as you do, and I go through great lengths to make sure that I only have one script tag for my applications.
Bromote uses jsonpject under the hood to handle the remote loading of jsonp documents (anything requiring a callback parameter in the URL).
This was specifically designed for the google maps use case :)
On Mar 14, 2014, at 9:06, "John K. Paul" [email protected] wrote:
Wow, you're up early for brooklyn.
promethify can load a module async, but it does make the assumption that it only needs to be loaded once and then caches it for future requests. It is currently intended to be used with your own modules and not third parties.
I would be looking to @thlorenz's bromote for this functionality. I have the exact same philosophical feelings as you do, and I go through great lengths to make sure that I only have one script tag for my applications.
— Reply to this email directly or view it on GitHub.