From f999fd94620bc23d7998f0803d7cc61283632f1f Mon Sep 17 00:00:00 2001 From: koyu Date: Tue, 11 Jul 2023 11:58:11 +0200 Subject: [PATCH] Update --- package.json | 2 +- tasks/clean.js | 7 ++++++- yarn.lock | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4de510a..cb49f59 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@astrojs/mdx": "^0.19.7", "@astrojs/rss": "^2.4.3", "astro-icon": "^0.8.1", - "astro-seo": "^0.7.4", + "astro-seo": "^0.7.5", "husky-init": "^8.0.0", "jquery": "^3.7.0", "request": "^2.88.2", diff --git a/tasks/clean.js b/tasks/clean.js index 06e1494..f51e19d 100644 --- a/tasks/clean.js +++ b/tasks/clean.js @@ -13,6 +13,8 @@ const removeSub = (s) => { return d; } +console.log("Cleaning up logos..."); + fs.readFile("src/json/instances.json", 'utf8', (err, data) => { if (err) { console.log(err); @@ -23,7 +25,10 @@ fs.readFile("src/json/instances.json", 'utf8', (err, data) => { var logo = instance.logo; if (logo.startsWith("http://") || logo.startsWith("https://")) { var extension = logo.split("/")[logo.split("/").length - 1].split(".")[1] == undefined || logo.split("/")[logo.split("/").length - 1].split(".")[1].startsWith("com") ? "png" : logo.split("/")[logo.split("/").length - 1].split(".")[1]; - fs.rm(`public/fedilist/${removeSub(instance.instance).replace(".", "")}.${extension}`, () => {}); + var filename = `public/fedilist/${removeSub(instance.instance).replace(".", "")}.${extension}`; + fs.rm(filename, () => { + console.log(`Deleted ${filename}`); + }); } }); }); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 7bca510..1948c8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1004,10 +1004,10 @@ astro-icon@^0.8.1: resolve-pkg "^2.0.0" svgo "^2.8.0" -astro-seo@^0.7.4: - version "0.7.4" - resolved "https://registry.yarnpkg.com/astro-seo/-/astro-seo-0.7.4.tgz#0c2788b97ec3944390be2dd39a8ad9a6aec294b0" - integrity sha512-E+wJmxOnvBRjgzVctdGk/VdwoEqeQ6Q/KgVW2wRBXZWJVDgOweB32Da/UiH0/FpGncPzo2daOrc08DNn5wTanw== +astro-seo@^0.7.5: + version "0.7.5" + resolved "https://registry.yarnpkg.com/astro-seo/-/astro-seo-0.7.5.tgz#0ce29afe4b979da343315de4e4381a2ee44ce242" + integrity sha512-bo5PiB4Y30PP9QS6OnYcVOr1fKDE52mvJys/3HgeiM2h+/hS7jESUHZMx6VX7yRid1yMGHsp2OyVTA9DrdPyPg== astro@^2.8.0: version "2.8.0"