mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Switch to es6 again
This commit is contained in:
parent
781273e91d
commit
80a80c11e6
@ -108,13 +108,8 @@
|
|||||||
callbackDone = true;
|
callbackDone = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// var scriptEs6 = makeJsTag(bundleSrc, bundleIntegrity);
|
var scriptEs6 = makeJsTag(bundleSrc, bundleIntegrity);
|
||||||
// scriptEs6.addEventListener("error", loadFallbackJs);
|
scriptEs6.addEventListener("error", loadFallbackJs);
|
||||||
// scriptEs6.addEventListener("load", onJsLoaded);
|
scriptEs6.addEventListener("load", onJsLoaded);
|
||||||
// document.head.appendChild(scriptEs6);
|
document.head.appendChild(scriptEs6);
|
||||||
|
|
||||||
var scriptTransp = makeJsTag(bundleSrcTranspiled, bundleIntegrityTranspiled);
|
|
||||||
scriptTransp.addEventListener("error", scriptFail);
|
|
||||||
scriptTransp.addEventListener("load", onJsLoaded);
|
|
||||||
document.head.appendChild(scriptTransp);
|
|
||||||
})();
|
})();
|
||||||
|
10
gulp/html.js
10
gulp/html.js
@ -167,16 +167,16 @@ function gulptasksHTML($, gulp, buildFolder) {
|
|||||||
const loadJs = document.createElement("script");
|
const loadJs = document.createElement("script");
|
||||||
loadJs.type = "text/javascript";
|
loadJs.type = "text/javascript";
|
||||||
let scriptContent = "";
|
let scriptContent = "";
|
||||||
// scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
|
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
|
||||||
scriptContent += `var bundleSrcTranspiled = '${cachebust(
|
scriptContent += `var bundleSrcTranspiled = '${cachebust(
|
||||||
"bundle-transpiled.js"
|
"bundle-transpiled.js"
|
||||||
)}';\n`;
|
)}';\n`;
|
||||||
|
|
||||||
if (integrity) {
|
if (integrity) {
|
||||||
// scriptContent +=
|
scriptContent +=
|
||||||
// "var bundleIntegrity = '" +
|
"var bundleIntegrity = '" +
|
||||||
// computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
|
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
|
||||||
// "';\n";
|
"';\n";
|
||||||
scriptContent +=
|
scriptContent +=
|
||||||
"var bundleIntegrityTranspiled = '" +
|
"var bundleIntegrityTranspiled = '" +
|
||||||
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +
|
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +
|
||||||
|
@ -86,9 +86,9 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"js." + variant + ".prod",
|
"js." + variant + ".prod",
|
||||||
|
|
||||||
// ES6 Currently not used
|
// transpiled currently not used
|
||||||
// gulp.parallel("js." + variant + ".prod.transpiled", "js." + variant + ".prod.es6")
|
// gulp.parallel("js." + variant + ".prod.transpiled", "js." + variant + ".prod.es6")
|
||||||
gulp.parallel("js." + variant + ".prod.transpiled")
|
gulp.parallel("js." + variant + ".prod.es6")
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// STANDALONE
|
// STANDALONE
|
||||||
|
Loading…
Reference in New Issue
Block a user