chore(build.js): remove unused code

This commit is contained in:
Rim 2025-03-31 23:00:18 -04:00
parent 7a465c6222
commit 360761331c

View File

@ -298,43 +298,6 @@ function minifyJSON() {
}
}
// Minify HTML files and update references
/*
function minifyHTML() {
console.log('Minifying HTML files...');
const files = glob.sync(config.html.src);
for (const file of files) {
let content = fs.readFileSync(file, 'utf8');
// Update JS references to minified versions, preserving directory structure
content = content.replace(/src=["'](.+?)\.js["']/g, (match, p1) => {
return `src="${p1}.min.js"`;
});
// Update CSS references to minified versions, preserving directory structure
content = content.replace(/href=["'](.+?)\.css["']/g, (match, p1) => {
return `href="${p1}.min.css"`;
});
// Minify HTML
const minified = htmlmin.minify(content, {
collapseWhitespace: true,
removeComments: true,
minifyJS: true,
minifyCSS: true,
removeRedundantAttributes: true,
removeEmptyAttributes: true,
removeOptionalTags: true
});
const outputPath = createOutputPath(file, '.');
ensureDirectoryExistence(outputPath);
fs.writeFileSync(outputPath, minified);
console.log(`✓ Minified: ${file} -> ${outputPath}`);
}
} */
// Minify HTML files
function minifyHTML() {
console.log('Minifying HTML files...');