From 6df6fab0cbdfa97be5490c139c1abcf77eb208d0 Mon Sep 17 00:00:00 2001 From: alexesprit Date: Mon, 13 Apr 2020 14:59:57 +0300 Subject: [PATCH] Update UMD template Use single quotes. Add missing semicolon. --- templates/umd.hbs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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}}} });