mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-15 22:56:35 +00:00
19 lines
499 B
JavaScript
Executable File
19 lines
499 B
JavaScript
Executable File
var minify = require('html-minifier');
|
|
var fs = require('fs');
|
|
|
|
var html = fs.readFileSync('build/frontend.vulcan.html').toString();
|
|
|
|
var minifiedHtml = minify.minify(html, {
|
|
customAttrAssign: [/\$=/],
|
|
removeComments: true,
|
|
removeCommentsFromCDATA: true,
|
|
removeCDATASectionsFromCDATA: true,
|
|
collapseWhitespace: true,
|
|
removeScriptTypeAttributes: true,
|
|
removeStyleLinkTypeAttributes: true,
|
|
minifyJS: true,
|
|
minifyCSS: true,
|
|
});
|
|
|
|
fs.writeFileSync('build/frontend.html', minifiedHtml);
|