From 929f2c457650f04069d7eca047c183db9d5293ed Mon Sep 17 00:00:00 2001 From: tree Date: Wed, 26 Apr 2023 03:15:06 +0200 Subject: [PATCH] fix scripts --- utils/engine.js | 7 +++---- utils/exec.js | 8 ++++---- utils/sync.lib.js | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/utils/engine.js b/utils/engine.js index b943558..ed8c80f 100644 --- a/utils/engine.js +++ b/utils/engine.js @@ -225,7 +225,7 @@ class DeConf_Collection { }); } } - for (let sg of data.index.segments) { + for (const sg of data.index.segments) { if (sg.remote) { continue; } @@ -260,7 +260,6 @@ class DeConf_Collection { } async optimizeImages() { - let base = {}; for (const as of this.assets) { if (this.data.index[as]) { await this.optimizeImageFile(this.data.index[as]); @@ -334,10 +333,10 @@ class DeConf_Collection { //await _imageOptimalizedWrite(tmpfile, fn); console.log(`${fn} writed`); - const sizes = [150, 300, 500]; + /*const sizes = [150, 300, 500]; for (const sz of sizes) { console; - } + }*/ sp.photo = ["photos", "speakers", ffn].join("/"); } diff --git a/utils/exec.js b/utils/exec.js index 4f3b6bd..16c2deb 100644 --- a/utils/exec.js +++ b/utils/exec.js @@ -3,16 +3,16 @@ import { DeConfEngine } from "./engine.js"; const deconf = new DeConfEngine(); await deconf.init(); -let cmd = Deno.args[0] || "build"; -let args = Deno.args.slice(1) || []; +const cmd = Deno.args[0] || "build"; +const args = Deno.args.slice(1) || []; -const options = Object.fromEntries( +/*const options = Object.fromEntries( args.map((x) => { const [key, value] = x.split("="); if (!value) return null; return [key, value]; }).filter((x) => x), -); +);*/ const output = await deconf[cmd](...args); if (output) { diff --git a/utils/sync.lib.js b/utils/sync.lib.js index 13e940e..57eddc7 100644 --- a/utils/sync.lib.js +++ b/utils/sync.lib.js @@ -9,7 +9,6 @@ export async function loadJSONUrl(url, options) { } export async function loadHtmlUrl(url) { - const cacheTimeout = 3600; await ensureDir(CACHE_DIR); const hash = Array.from( new Uint8Array(