mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-24 12:49:19 +00:00
ES6 Polymer version
This commit is contained in:
20
scripts/minify.js
Executable file
20
scripts/minify.js
Executable file
@@ -0,0 +1,20 @@
|
||||
var minify = require('html-minifier');
|
||||
var fs = require('fs');
|
||||
|
||||
var html = fs.readFileSync('build/frontend.vulcan.html').toString();
|
||||
|
||||
// removeComments: true,
|
||||
// collapseWhitespace: true,
|
||||
var minifiedHtml = minify.minify(html, {
|
||||
customAttrAssign: [/\$=/],
|
||||
"removeComments": true,
|
||||
"removeCommentsFromCDATA": true,
|
||||
"removeCDATASectionsFromCDATA": true,
|
||||
"collapseWhitespace": true,
|
||||
"collapseBooleanAttributes": true,
|
||||
"removeScriptTypeAttributes": true,
|
||||
"removeStyleLinkTypeAttributes": true,
|
||||
"minifyJS": true,
|
||||
});
|
||||
|
||||
fs.writeFileSync('build/frontend.html', minifiedHtml);
|
||||
Reference in New Issue
Block a user