Last active
December 15, 2015 18:19
-
-
Save uhop/5302633 to your computer and use it in GitHub Desktop.
UMD header
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
/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) | |
(["module", "../main"], function(module, unit){ | |
// module's code | |
}); | |
/* UMD.require */ (typeof define=="function"&&require||function(d,f,m){m={module:module,require:require};f.apply(null,d.map(function(n){return m[n]||require(n)}))}) | |
(["module", "../main"], function(module, unit){ | |
// module's code | |
}); |
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
/* UMD.define */ (typeof define == "function" && define || | |
function(d, f, m){ | |
m = {module: module, require: require}; | |
module.exports = f.apply(null, d.map(function(n){ return m[n] || require(n) })) | |
} | |
) | |
(["module", "../main"], function(module, unit){ | |
// module's code | |
}); | |
/* UMD.require */ (typeof define == "function" && require || | |
function(d, f, m){ | |
m = {module: module, require: require}; | |
f.apply(null, d.map(function(n){ return m[n] || require(n) })) | |
} | |
) | |
(["module", "../main"], function(module, unit){ | |
// module's code | |
}); |
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
/* UMD.define */ (function(deps, factory){ | |
if(typeof define != "undefined"){ | |
define(deps, factory); | |
}else if(typeof module != "undefined"){ | |
module.exports = factory.apply(null, deps.map(function req(name){ | |
return name == "require" && require || name == "module" && module || require(name); | |
})); | |
} | |
}) | |
(["module", "../main"], function(module, unit){ | |
// module's code | |
}); | |
/* UMD.require */ (function(deps, factory){ | |
if(typeof define != "undefined"){ | |
require(deps, factory); | |
}else if(typeof module != "undefined"){ | |
factory.apply(null, deps.map(function req(name){ | |
return name == "require" && require || name == "module" && module || require(name); | |
})); | |
} | |
}) | |
(["module", "../main"], function(module, unit){ | |
// module's code | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment