mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
consolidate build scripts, reorganize source into src/ directory, fix favicon injection
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user