minification for archive.html
This commit is contained in:
@ -322,8 +322,26 @@ try {
|
||||
|
||||
archivedOutput += `${archivedEndPart}`;
|
||||
|
||||
// Generate 'beginner.html' file
|
||||
fs.writeFileSync(path.join(docsPath, 'archive.html'), archivedOutput);
|
||||
|
||||
|
||||
// Generate and minify 'archive.html' file
|
||||
const minifiedArchivedOutput = minify(archivedOutput, {
|
||||
collapseBooleanAttributes: true,
|
||||
collapseWhitespace: true,
|
||||
decodeEntities: false,
|
||||
minifyCSS: true,
|
||||
minifyJS: true,
|
||||
keepClosingSlash: true,
|
||||
processConditionalComments: true,
|
||||
removeAttributeQuotes: false,
|
||||
removeComments: true,
|
||||
removeEmptyAttributes: false,
|
||||
removeOptionalTags: false,
|
||||
removeScriptTypeAttributes: false,
|
||||
removeStyleLinkTypeAttributes: false,
|
||||
trimCustomFragments: true
|
||||
});
|
||||
fs.writeFileSync(path.join(docsPath, 'archive.html'), minifiedArchivedOutput);
|
||||
console.log(`${chalk.green('SUCCESS!')} archive.html file generated!`);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user