Format output.js for readability.

This commit is contained in:
Joseph Cloutier
2024-06-10 14:11:46 -04:00
parent 8066037cdd
commit bbcb8bea07

View File

@@ -1,35 +1,47 @@
(function ($hx_exports, $global) { "use strict"; var $hx_script = (function (exports, global) { ::SOURCE_FILE:: (function ($hx_exports, $global) {
}); "use strict";
if (typeof self !== "undefined" && self.constructor.name.includes("Worker")) {
var $hx_script = (function (exports, global) { ::SOURCE_FILE:: });
if (typeof self !== "undefined" && self.constructor.name.includes("Worker")) {
// No need for exports in a worker context, just initialize statics. // No need for exports in a worker context, just initialize statics.
$hx_script({}, $global); $hx_script({}, $global);
} else { } else {
$hx_exports.lime = $hx_exports.lime || {}; $hx_exports.lime = $hx_exports.lime || {};
$hx_exports.lime.$scripts = $hx_exports.lime.$scripts || {}; $hx_exports.lime.$scripts = $hx_exports.lime.$scripts || {};
$hx_exports.lime.$scripts["::APP_FILE::"] = $hx_script; $hx_exports.lime.$scripts["::APP_FILE::"] = $hx_script;
$hx_exports.lime.embed = function(projectName) { var exports = {};
$hx_exports.lime.embed = function (projectName) {
var exports = {};
var script = $hx_exports.lime.$scripts[projectName]; var script = $hx_exports.lime.$scripts[projectName];
if (!script) throw Error("Cannot find project name \"" + projectName + "\""); if (!script) throw Error("Cannot find project name \"" + projectName + "\"");
script(exports, $global); script(exports, $global);
for (var key in exports) $hx_exports[key] = $hx_exports[key] || exports[key]; for (var key in exports) $hx_exports[key] = $hx_exports[key] || exports[key];
var lime = exports.lime || window.lime; var lime = exports.lime || window.lime;
if (lime && lime.embed && this != lime.embed) lime.embed.apply(lime, arguments); if (lime && lime.embed && this != lime.embed) lime.embed.apply(lime, arguments);
return exports; return exports;
}; };
} }
::if false::
AMD compatibility: If define() is present we need to // AMD compatibility: If define() is present we need to
- call it, to define our module // - call it, to define our module
- disable it so that the embedded libraries register themselves in the global scope! // - disable it so that the embedded libraries register themselves in the global scope!
::end::if(typeof define == "function" && define.amd) { if (typeof define == "function" && define.amd) {
define([], function() { return $hx_exports.lime; }); define([], function () { return $hx_exports.lime; });
define.__amd = define.amd; define.__amd = define.amd;
define.amd = null; define.amd = null;
} }
})(typeof exports != "undefined" ? exports : typeof define == "function" && define.amd ? {} : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this, typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this); })(typeof exports != "undefined" ? exports : typeof define == "function" && define.amd ? {} : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this,
::if embeddedLibraries::::foreach (embeddedLibraries):: typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this);
::if embeddedLibraries::::foreach embeddedLibraries::
::__current__::::end::::end:: ::__current__::::end::::end::
if(typeof define == "function" && define.__amd) {
if (typeof define == "function" && define.__amd) {
define.amd = define.__amd; define.amd = define.__amd;
delete define.__amd; delete define.__amd;
} }