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
.src([cwd + '/**/*.html', '!' + cwd + '/**/*.inc.html'])
.pipe(preprocess({ context }))
.pipe(inlineImg({ getHTTP: confItems[0]["isRemoteUrl"] }))
.pipe(inlineImg({ getHTTP: confItems[0]['inlineRemoteUrl'] }))
.pipe(
inlineCss({
applyTableAttributes: true,

View File

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

View File

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

View File

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