From 5704ade5dc8229171fa12acde5ec6655b12ce848 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 3 Dec 2020 13:27:48 +0100 Subject: [PATCH] more build script cleanup --- scripts/build.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 8a04234..71f897b 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -60,10 +60,8 @@ async function build() { await assets.write(`bundle-legacy.js`, await buildJsLegacy("src/main.js", assets, ["src/polyfill.js"])); await assets.write(`bundle.css`, await buildCss("css/main.css", assets)); await assets.writeUnhashed(".well-known/apple-app-site-association", buildAppleAssociatedAppsFile(createClients())); - + await assets.writeUnhashed("index.html", await buildHtml(assets)); const globalHash = assets.hashForAll(); - - await buildHtml(assets); console.log(`built matrix.to ${version} (${globalHash}) successfully with ${assets.size} files`); } @@ -77,10 +75,7 @@ async function buildHtml(assets) { `` ]; doc("script#main").replaceWith(mainScripts.join("")); - const html = doc.html(); - // include in the global hash, even not hashed itself - assets.addToHashForAll("index.html", html); - await assets.writeUnhashed("index.html", html); + return doc.html(); } function createReplaceUrlPlugin(assets) {