umd template
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 (root, factory) { | |
var name = "FooMod"; | |
var deps = ["this", "that", "whatnot"]; | |
if (typeof exports === "object") { | |
module.exports = factory.apply(undefined, deps.map(function (d) { return require(d); })); | |
} else if (typeof define === "function" && define.amd) { | |
define(deps, factory); | |
} else { | |
root[name] = factory.apply(undefined, map(deps, function (d) { return root[d]; })); | |
} | |
}(this, function Factory(This, That, Whatnot) { | |
var FooMod = {} | |
return FooMod; | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment