From 880c2823074b6e4c7b04c2a0a97ab5f88a001068 Mon Sep 17 00:00:00 2001 From: Dan Mindru Date: Sat, 4 Sep 2021 09:30:58 +0200 Subject: [PATCH] Rename param to inlineRemoteUrl --- tasks/build.js | 2 +- tasks/check-for-image-url.js | 3 ++- templates/dark/conf.json | 5 ++--- templates/light/conf.json | 5 ++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tasks/build.js b/tasks/build.js index b37bbe8..52e2a52 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -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, diff --git a/tasks/check-for-image-url.js b/tasks/check-for-image-url.js index f245bbc..33779d3 100644 --- a/tasks/check-for-image-url.js +++ b/tasks/check-for-image-url.js @@ -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); } diff --git a/templates/dark/conf.json b/templates/dark/conf.json index a2a08ec..02a5253 100644 --- a/templates/dark/conf.json +++ b/templates/dark/conf.json @@ -7,6 +7,5 @@ "slogan": "LED Pylon. LED Wall. Digital Signage.", "logoUrl": "/assets/dark.png", "logoAlt": "dark logo", - "website": "http://dark.dk", - "isRemoteUrl": false -} \ No newline at end of file + "website": "http://dark.dk" +} diff --git a/templates/light/conf.json b/templates/light/conf.json index e99fb4b..4d65d66 100644 --- a/templates/light/conf.json +++ b/templates/light/conf.json @@ -9,6 +9,5 @@ "contactSecondary": "Happy Steet 31, DK-8000 Aarhus C, Denmark", "logoUrl": "/assets/light.png", "logoAlt": "light logo", - "website": "http://light.dk", - "isRemoteUrl": false -} \ No newline at end of file + "website": "http://light.dk" +}