mirror of
https://github.com/wled/WLED.git
synced 2025-07-30 06:06:37 +00:00
fix #4166
This commit is contained in:
parent
271a07a7d6
commit
4b6041302e
1871
package-lock.json
generated
1871
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -25,7 +25,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clean-css": "^5.3.3",
|
"clean-css": "^5.3.3",
|
||||||
"html-minifier-terser": "^7.2.0",
|
"html-minifier-terser": "^7.2.0",
|
||||||
"inliner": "^1.13.1",
|
"web-resource-inliner": "^7.0.0",
|
||||||
"nodemon": "^3.1.7"
|
"nodemon": "^3.1.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
const fs = require("node:fs");
|
const fs = require("node:fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const inliner = require("inliner");
|
const inline = require("web-resource-inliner");
|
||||||
const zlib = require("node:zlib");
|
const zlib = require("node:zlib");
|
||||||
const CleanCSS = require("clean-css");
|
const CleanCSS = require("clean-css");
|
||||||
const minifyHtml = require("html-minifier-terser").minify;
|
const minifyHtml = require("html-minifier-terser").minify;
|
||||||
@ -127,7 +127,12 @@ async function minify(str, type = "plain") {
|
|||||||
|
|
||||||
async function writeHtmlGzipped(sourceFile, resultFile, page) {
|
async function writeHtmlGzipped(sourceFile, resultFile, page) {
|
||||||
console.info("Reading " + sourceFile);
|
console.info("Reading " + sourceFile);
|
||||||
new inliner(sourceFile, async function (error, html) {
|
inline.html({
|
||||||
|
fileContent: fs.readFileSync(sourceFile, "utf8"),
|
||||||
|
relativeTo: path.dirname(sourceFile),
|
||||||
|
strict: true,
|
||||||
|
},
|
||||||
|
async function (error, html) {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
|
|
||||||
html = adoptVersionAndRepo(html);
|
html = adoptVersionAndRepo(html);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user