diff --git a/templates/umd.hbs b/templates/umd.hbs index d003d51..b2dbdac 100644 --- a/templates/umd.hbs +++ b/templates/umd.hbs @@ -1,16 +1,18 @@ -(function (root, factory) { - if (root === undefined && window !== undefined) root = window; - if (typeof define === "function" && define.amd) { - define("{{amdModuleId}}", ["module"], factory); - } else if (typeof exports !== "undefined") { +(function(root, factory) { + if (root === undefined && window !== undefined) { + root = window; + } + if (typeof define === 'function' && define.amd) { + define('{{amdModuleId}}', ['module'], factory); + } else if (typeof exports !== 'undefined') { factory(module); } else { - var mod = { + const mod = { exports: {} }; factory(mod); - root['{{{objectToExport}}}'] = mod.exports + root['{{{objectToExport}}}'] = mod.exports; } -})(this, function (module) { +})(this, function(module) { {{{code}}} });