Skip to content

Instantly share code, notes, and snippets.

@jrburke
Created October 20, 2011 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrburke/1301798 to your computer and use it in GitHub Desktop.
Save jrburke/1301798 to your computer and use it in GitHub Desktop.
AMD in YUI?
//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