Created
October 20, 2011 17:53
-
-
Save jrburke/1301798 to your computer and use it in GitHub Desktop.
AMD in YUI?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in some/thing.js | |
define('some/thing', ['a', 'some/b'], function (a, b) { | |
return 'value'; | |
}); | |
//YUI loader would apply the return value from the define | |
//as the 'some/thing' property on the YUI instance, | |
//so the above module could be used like so: | |
//in some code that uses YUI: | |
YUI().use('some/thing', function (Y) { | |
var thing = Y['some/thing']; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment