chore: Update build.js to return compressedHtmlString instead of compressedCssString

This commit is contained in:
Harvey Zack committed 2024-05-27 12:43:50 +08:00
1 parent 774ca866d2
commit c1457dd9ae
9 files changed
+10 -40

No files matched your search

+2 -2
View File
@@ -11,10 +11,10 @@ const compiledPath = path.resolve(`docs/compiled`);
function compressString(input) {
const compressedHtmlString = input.replace(/\s*(<[^>]+>)\s*/g, '$1');
const compressedCssString = compressedHtmlString
.replace(/\s*([:;,])\s*/g, '$1')
.replace(/(\r\n|\n|\r)/gm, ' ')
.replace(/\s+/g, ' ')
.trim();
return compressedHtmlString;
return compressedCssString;
}
async function build(name, targetName) {