From d587eea7465a6f39ea4d67825138a5c845d4ddc8 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Fri, 13 Dec 2024 13:56:15 -0600 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20download=20assets=20in=20import?= =?UTF-8?q?=20dep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActivityFeed.js | 16 ++++++++++++---- package.json | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ActivityFeed.js b/ActivityFeed.js index 4b6fdd0..b2e01b2 100644 --- a/ActivityFeed.js +++ b/ActivityFeed.js @@ -2,10 +2,18 @@ import { Importer } from "@11ty/import"; import pluginRss from "@11ty/eleventy-plugin-rss"; class ActivityFeed { - constructor() { - this.importer = new Importer(); - this.importer.setDryRun(true); - this.contentType + #importer; + + get importer() { + if(!this.#importer) { + this.#importer = new Importer(); + this.#importer.setDryRun(true); + this.#importer.setAssetReferenceType("disabled"); + // TODO make this an option + this.#importer.setVerbose(false); // --quiet + } + + return this.#importer; } setCacheDuration(duration) { diff --git a/package.json b/package.json index 736b24b..564f007 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,6 @@ "homepage": "https://github.com/11ty/eleventy-activity-feed#readme", "dependencies": { "@11ty/eleventy-plugin-rss": "^2.0.2", - "@11ty/import": "^1.0.7" + "@11ty/import": "^1.0.8" } }