Skip to content

Instantly share code, notes, and snippets.

@fearphage
Created September 20, 2013 22:32
Show Gist options
  • Save fearphage/6644815 to your computer and use it in GitHub Desktop.
Save fearphage/6644815 to your computer and use it in GitHub Desktop.
define(['module'], function(module) {
var fullPath = function(name) {
var config = module.config();
return (config.path || '') + name;
};
return {
load: function (name, req, load, config) {
req(['wrapper', fullPath(name)], function(Wrapper, value) {
if (config.isBuild) {
load();
}
else {
load(Wrapper.extend(value));
}
});
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment