mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 12:49:19 +00:00
Move minify script
This commit is contained in:
17
script/minify.js
Executable file
17
script/minify.js
Executable file
@@ -0,0 +1,17 @@
|
||||
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,
|
||||
});
|
||||
|
||||
fs.writeFileSync('build/frontend.html', minifiedHtml);
|
||||
Reference in New Issue
Block a user