Skip to content

Instantly share code, notes, and snippets.

@jcreamer898
Last active December 17, 2015 22:59
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 jcreamer898/5685754 to your computer and use it in GitHub Desktop.
Save jcreamer898/5685754 to your computer and use it in GitHub Desktop.
A way to adjust the module context in require.js
require(['jquery', 'underscore'], function($, _) {
require.s.contexts._.execCb = function(name, callback, args) {
return callback.apply({
$: $,
_: _
}, args);
};
// init app here
});
@jcreamer898
Copy link
Author

LOL @ifandelse I somehow JUST saw this comment. Epic gif is epic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment