RE: conventions for prollyfills

> As archive for anything strictly web related, bower is what npm stays  
> for node.js. 
>  
> http://bower.io/ 
>  
> Most if not all modules in there are based indeed in RequireJS and AMD  
> where both solved the "don't want to load many times the same thing" a  
> while ago and no prollyfill is needed ;-) 
>  
> You might use both services together or just bower or just requirejs  
> configured for your own needs. 
 
 
That looks great. I guess it solves the versioning problem, if polyfills expose their modules correctly.
 
There's still the open question of allowing your code to work with multiple polyfills for the same web feature, and not just one of them. We may have to think about that. 
 
 
 
Maybe we should just propose modules to have an alias like "@ANY/Promise" in addition to their real name, so that authors can choose to require either a certain kind of Promise polyfill, or just any kind using "@ANY/Promise". That way, people can just do things like:
 
#   require.specified('@ANY/Promise') ? require('@ANY/Promise') : require('promise-lib-2')
 
What do you think?
 
 
 
This is kinda the "RequireJS global namespace". 		 	   		  

Received on Wednesday, 25 September 2013 17:26:31 UTC