-
-
Save nonsensecreativity/4f72c5e7731233d839bcb741158037c9 to your computer and use it in GitHub Desktop.
This file contains 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
; (function (global, define) { define('module-name', function (require, exports, module) { | |
// CommonJS style code here | |
/*! | |
* UMD/AMD/Global context Module Loader wrapper | |
* based off https://gist.github.com/tejacques/202a8f2d198ddd54a409 | |
* | |
* This wrapper will try to use a module loader with the | |
* following priority: | |
* | |
* 1.) AMD | |
* 2.) CommonJS | |
* 3.) Context Variable (this) | |
* - window in the browser | |
* - module.exports in node and browserify | |
*/ | |
});})( | |
typeof window == 'object' ? window : global, | |
typeof define == 'function' && define.amd ? define : (function (context) { | |
'use strict'; | |
return typeof module == 'object' ? function (name, factory) { | |
factory(require, exports, module); | |
} | |
: function (name, factory) { | |
var module = { | |
exports: {} | |
}; | |
var require = function (n) { | |
if (n === 'jquery') { | |
n = 'jQuery'; | |
} | |
return context[n]; | |
}; | |
factory(require, module.exports, module); | |
context[name] = module.exports; | |
}; | |
})(this)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment