Initial commit: HMDesignSystem baseline
This commit is contained in:
commit
b6a0a61103
486 files changed
+68432
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { readFile, writeFile } from "node:fs/promises"
|
||||
|
||||
const path = "dist-dashboard/index.html"
|
||||
const html = await readFile(path, "utf8")
|
||||
const finalized = html.replace(
|
||||
'<script type="module" crossorigin src="./assets/dashboard-export.js"></script>',
|
||||
'<script defer src="./assets/dashboard-export.js"></script>',
|
||||
).replace(
|
||||
/(<link\s+rel="stylesheet")\s+crossorigin(\s+href="\.\/assets\/[^\"]+\.css")/,
|
||||
"$1$2",
|
||||
)
|
||||
|
||||
if (finalized === html) {
|
||||
throw new Error(`Dashboard export script tag was not found in ${path}`)
|
||||
}
|
||||
|
||||
await writeFile(path, finalized)
|
||||
Reference in new issue
Block a user