Created
October 9, 2012 18:06
-
-
Save ecto/3860403 to your computer and use it in GitHub Desktop.
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
| /* | |
| Example of achieving compatibility with AMD and standard CommonJS by putting boilerplate around the standard CommonJS module format: | |
| */ | |
| (function(define){ | |
| define(function(require,exports){ | |
| // module contents | |
| var dep1 = require("dep1"); | |
| exports.someExportedFunction = function(){...}; | |
| //... | |
| }); | |
| })(typeof define=="function"?define:function(factory){factory(require,exports)}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment