Skip to content

Commit

Permalink
Don’t download assets in import dep
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Dec 13, 2024
1 parent 8be0c14 commit d587eea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions ActivityFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit d587eea

Please sign in to comment.