consolidate build scripts, reorganize source into src/ directory, fix favicon injection

This commit is contained in:
Nystik
2026-03-20 23:46:17 +01:00
parent 2add5238b8
commit 0747a4540d
56 changed files with 46 additions and 45 deletions

View File

@@ -37,15 +37,18 @@ function patchHtml(filePath) {
"\n",
);
// Inject ignis assets before the first <script> tag
const ignisBlock =
' <link rel="icon" type="image/png" href="favicon.png">\n' +
' <script type="text/javascript" src="ignis-ui.js"></script>\n' +
' <script type="text/javascript" src="shim-loader.js"></script>\n';
// Inject favicon into <head>
html = html.replace(
"</head>",
' <link rel="icon" type="image/png" href="favicon.png">\n</head>',
);
// Inject ignis scripts before the first <script> tag
html = html.replace(
'<script type="text/javascript"',
ignisBlock + '<script type="text/javascript"',
'<script type="text/javascript" src="ignis-ui.js"></script>\n' +
'<script type="text/javascript" src="shim-loader.js"></script>\n' +
'<script type="text/javascript"',
);
fs.writeFileSync(filePath, html);