Skip to content

Commit

Permalink
Update UMD template
Browse files Browse the repository at this point in the history
Use single quotes.
Add missing semicolon.
  • Loading branch information
alexesprit committed Apr 13, 2020
1 parent f6f09dc commit 6df6fab
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions templates/umd.hbs
Original file line number Diff line number Diff line change
@@ -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}}}
});

0 comments on commit 6df6fab

Please sign in to comment.