Re:DefineJS – A lightweight implementation of AMD module format
by m90 on Sunday November 16, 2014 @10:13AM
(#8614347)
I'm all in for more choices in AMD implementations, but why doesn't this expose the standard `require` and `define` methods? I do get that I'm supposed to map them myself, but then again I have no clue what advantage I get from this?
[ Parent
| on HN ]
Re:DefineJS – A lightweight implementation of AMD module format
by fixjs on Sunday November 16, 2014 @10:53AM
(#8614467)
One of the main goals here is to provide developers the ability of exposing it to different globals with different behaviors and configuration, which is not possible yet in this version, but it will be there in the next couple of hours.
Re:DefineJS – A lightweight implementation of AMD module format
by fixjs on Sunday November 16, 2014 @10:46AM
(#8614449)
Actually in the current version to expose them to the global scope, you should add the global attribute to your script tag and pass the window as it's value, like global="window".