mirror of
https://github.com/wled/WLED.git
synced 2025-07-12 21:36:32 +00:00
Merge pull request #4266 from w00000dy/cdata
Migrate from inliner to web-resource-inliner
This commit is contained in:
commit
f396dac1cc
1893
package-lock.json
generated
1893
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -25,8 +25,8 @@
|
||||
"dependencies": {
|
||||
"clean-css": "^5.3.3",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"inliner": "^1.13.1",
|
||||
"nodemon": "^3.1.7"
|
||||
"web-resource-inliner": "^7.0.0",
|
||||
"nodemon": "^3.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
const fs = require("node:fs");
|
||||
const path = require("path");
|
||||
const inliner = require("inliner");
|
||||
const inline = require("web-resource-inliner");
|
||||
const zlib = require("node:zlib");
|
||||
const CleanCSS = require("clean-css");
|
||||
const minifyHtml = require("html-minifier-terser").minify;
|
||||
@ -128,7 +128,12 @@ async function minify(str, type = "plain") {
|
||||
|
||||
async function writeHtmlGzipped(sourceFile, resultFile, page) {
|
||||
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;
|
||||
|
||||
html = adoptVersionAndRepo(html);
|
||||
|
Loading…
x
Reference in New Issue
Block a user