Handle new Vite format in diff cleaning for tests.

This commit is contained in:
Dillon Kearns 2022-12-26 12:03:58 -07:00
parent 643abc0591
commit 81888ea995
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<title></title>
<link rel="modulepreload" crossorigin href="/elm.HASH.js"><link rel="modulepreload" crossorigin href="/assets/index.HASH.js"><link rel="preload" href="/assets/index.HASH.css" as="style">
<link rel="modulepreload" crossorigin href="/elm.HASH.js"><link rel="preload" href="/assets/index.HASH.css" as="style"><link rel="modulepreload" crossorigin href="/assets/index.HASH.js">
<script defer src="/elm.HASH.js" type="text/javascript"></script>

View File

@ -5,7 +5,7 @@
"scripts": {
"start": "elm-pages dev",
"test": "elm-pages build --debug && npm run clean-diff && elm-pages build && npm run clean-diff",
"clean-diff": "sed -E -i.bak 's/\\.[a-f0-9]{8}\\.([a-z]{2,4})/.HASH.\\1/gi' ./dist/escaping/index.html && sed -i.bak 's/<meta name=\"generator\".*$//gi' ./dist/escaping/index.html && git diff --exit-code ./dist",
"clean-diff": "sed -E -i.bak 's/[.-][a-f0-9]{8}([.-][a-z]{2,4})/.HASH\\1/gi' ./dist/escaping/index.html && sed -i.bak 's/<meta name=\"generator\".*$//gi' ./dist/escaping/index.html && git diff --exit-code ./dist",
"build": "elm-pages build"
},
"author": "Dillon Kearns",
@ -15,4 +15,4 @@
"elm-review": "^2.7.1",
"elm-tooling": "^1.3.0"
}
}
}