Skip to content

Commit

Permalink
Remove peerDependencies and move to internal plugin compatibility che…
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Oct 7, 2021
1 parent 0deac98 commit d18b45a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
const pkg = require("./package.json");
const dateRfc3339 = require("./src/dateRfc3339");
const absoluteUrl = require("./src/absoluteUrl");
const convertHtmlToAbsoluteUrls = require("./src/htmlToAbsoluteUrls");
const getNewestCollectionItemDate = require("./src/getNewestCollectionItemDate");

module.exports = function(eleventyConfig, options = {}) {
try {
eleventyConfig.versionCheck(pkg["11ty"].compatibility);
} catch(e) {
console.log( `WARN: Eleventy Plugin (${pkg.name}) Compatibility: ${e.message}` );
}

eleventyConfig.addNunjucksFilter("absoluteUrl", absoluteUrl);

eleventyConfig.addNunjucksAsyncFilter("htmlToAbsoluteUrls", (htmlContent, base, callback) => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"url": "https://github.com/11ty/eleventy-plugin-rss/issues"
},
"homepage": "https://www.11ty.dev/docs/plugins/rss/",
"peerDependencies": {
"@11ty/eleventy": ">=0.11.0"
"11ty": {
"compatibility": ">=0.11"
},
"devDependencies": {
"ava": "^3.15.0"
Expand Down

0 comments on commit d18b45a

Please sign in to comment.