tysonmatanich/elementQuery — pull request #9 by itsravenous (2013-11-20 13:13:11+00:00)
Title: Add amd support

This pull req adds support for requireJS-style AMD loading of the script, while still allowing it to be loaded normally via a script tag.

It splits the getEmPixels function into its own file and defines it as a separate module, upon which the defined elementQuery module depends.

The modules are explicitly named rather than anonymous: elementQuery and getEmPixels.

The result has not been feature-tested (lunchhour project!), but I have tested that the same objects are attached to global or exported via the module API as would have been before. This might be good enough for you, or not. Either way, hope it's useful.