mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 10:01:20 -08:00
chore: Update build.js to return compressedHtmlString instead of compressedCssString
This commit is contained in:
1 parent
774ca866d2
commit
c1457dd9ae
9 files changed
+10
-40
No files matched your search
+2
-2
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user