Last active
March 9, 2016 17:36
-
-
Save gatlin/f72739ca62692bede397 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
/** | |
* ECMAScript module boilerplate | |
* | |
* (c) 2016 Gatlin Johnson <gatlin@niltag.net> | |
* with significant credit to github user @cwmyers | |
* | |
* Follow this template and your module will be compatible with browsers or any | |
* number of sophisticated ES dependency systems. | |
* | |
* INSTRUCTIONS | |
* | |
* Write your definitions between MODULE BEGIN and MODULE END. Anything you | |
* wish to export publicly should be added to the `module` object. | |
*/ | |
(function(root, factory) { | |
if (typeof exports === 'object') { | |
module.exports = factory(root); | |
} else | |
if (typeof define === 'function' && define.amd) { | |
define(factory); | |
} else { | |
root = factory(root); | |
} | |
}(this, function(module) { | |
////////// | |
// MODULE BEGIN | |
////////// | |
var private_data = "this is not exported"; | |
module.foo = "this will be exported"; | |
////////// | |
// MODULE END | |
////////// | |
return module; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment