UNPKG

1.07 kBtext/x-handlebars-templateView Raw
1{{! UMD template that can be useful to wrap standalone CommonJS/Node modules}}
2(function(root, factory) {
3 if(typeof module === 'object' && module.exports) {
4 module.exports = factory({{#if cjsDependencies.wrapped}}{{{cjsDependencies.wrapped}}}, {{/if}}require, exports, module);
5 }
6 else if(typeof define === 'function' && define.amd) {
7 define({{#if amdModuleId}}'{{amdModuleId}}', {{/if}}[{{#if amdDependencies.wrapped}}{{{amdDependencies.wrapped}}}, {{/if}}'require', 'exports', 'module'], factory);
8 }
9 else {
10 var req = function(id) {return root[id];},
11 exp = root,
12 mod = {exports: exp};
13 {{#if globalAlias}}root['{{globalAlias}}'] = {{else}}{{#if objectToExport}}root['{{objectToExport}}'] = {{/if}}{{/if}}factory({{#if globalDependencies.normal}}{{{globalDependencies.normal}}}, {{/if}}req, exp, mod);
14 }
15}(this, function({{#if dependencies}}{{dependencies}}, {{/if}}require, exports, module) {
16{{{code}}}
17return {{#if objectToExport}}{{objectToExport}}{{else}}module.exports{{/if}};
18}));
19
\No newline at end of file