Rename param to inlineRemoteUrl

This commit is contained in:
Dan Mindru 2021-09-04 09:30:58 +02:00
parent b2b6912181
commit 880c282307
4 changed files with 7 additions and 8 deletions

View File

@ -34,7 +34,7 @@ function buildTask(options) {
return options return options
.src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html']) .src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html'])
.pipe(preprocess({ context })) .pipe(preprocess({ context }))
.pipe(inlineImg({ getHTTP: confItems[0]["isRemoteUrl"] })) .pipe(inlineImg({ getHTTP: confItems[0]['inlineRemoteUrl'] }))
.pipe( .pipe(
inlineCss({ inlineCss({
applyTableAttributes: true, applyTableAttributes: true,

View File

@ -60,6 +60,7 @@ function inlineImg(options = {}) {
getSrcBase64(options.basedir || file.base, getHTTP, src, (err, result, resFormat, skipFormatting) => { getSrcBase64(options.basedir || file.base, getHTTP, src, (err, result, resFormat, skipFormatting) => {
if (err) { if (err) {
log.warn(`Failed to load http image. Check the format of ${src}.`);
log.error(err); log.error(err);
} else { } else {
// Need a format in and a result for this to work // Need a format in and a result for this to work
@ -140,7 +141,7 @@ function getSrcBase64(base, getHTTP, src, callback) {
} else { } else {
// Get remote file // Get remote file
if (getHTTP) { if (getHTTP) {
getHTTPBase64(src, callback); return getHTTPBase64(src, callback);
} else { } else {
callback(null, src, null, true); callback(null, src, null, true);
} }

View File

@ -7,6 +7,5 @@
"slogan": "LED Pylon. LED Wall. Digital Signage.", "slogan": "LED Pylon. LED Wall. Digital Signage.",
"logoUrl": "/assets/dark.png", "logoUrl": "/assets/dark.png",
"logoAlt": "dark logo", "logoAlt": "dark logo",
"website": "http://dark.dk", "website": "http://dark.dk"
"isRemoteUrl": false
} }

View File

@ -9,6 +9,5 @@
"contactSecondary": "<a href='https://mapurl.com'><span>Happy Steet 31, DK-8000 Aarhus C, Denmark</span></a>", "contactSecondary": "<a href='https://mapurl.com'><span>Happy Steet 31, DK-8000 Aarhus C, Denmark</span></a>",
"logoUrl": "/assets/light.png", "logoUrl": "/assets/light.png",
"logoAlt": "light logo", "logoAlt": "light logo",
"website": "http://light.dk", "website": "http://light.dk"
"isRemoteUrl": false
} }