Process JS using template, add support for unique statics in repeat lime.embed calls

This commit is contained in:
Joshua Granick
2019-02-12 13:14:40 -08:00
parent d9dbea7f6b
commit 3e9f875eaf
2 changed files with 23 additions and 0 deletions

15
templates/html5/output.js Normal file
View File

@@ -0,0 +1,15 @@
// lime.embed namespace wrapper
(function ($hx_exports, $global) { "use strict";
$hx_exports.lime = $hx_exports.lime || {};
$hx_exports.lime.$scripts = $hx_exports.lime.$scripts || {};
$hx_exports.lime.$scripts["::APP_FILE::"] = (function(exports, global) {
::SOURCE_FILE::
});
// End namespace wrapper
$hx_exports.lime.embed = function(projectName) { var exports = {};
$hx_exports.lime.$scripts[projectName](exports, $global);
for (var key in exports) $hx_exports[key] = $hx_exports[key] || exports[key];
exports.lime.embed.apply(exports.lime, arguments);
return exports;
};
})(typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);