RequireJS made ridiculously easy, in just 10ish minutes

added by Robert Greyling
1/12/2015 8:19:48 PM

168 Views

RequireJS is the coolest Javascript library you've ever seen. But judging by their website, it's not the easiest thing in the world to learn. Here's my take at keeping things short and to the point. Let me know what you think.


3 comments

Andy Summerfield
1/13/2015 4:24:30 PM
I watched part 2 of this series and he saying you need to 'AMDify' the libraries you add in order for them to work with require. I only have a little experience with require, but what I have used I have not seen or done this before. Is this something you actually have to do, or just a precaution?

Robert Greyling
1/16/2015 1:36:42 PM
It's advised yes because by doing that you enable your modules to run within their own namespace without interfering with each other. It doesn't pollute the global space thus avoiding clashes and strange bugs from things overwriting each other.

Andy Summerfield
1/16/2015 3:15:40 PM
That's very true, shall make sure to do that in any RequireJS projects! Cheers Rob :)