Skip to content

Commit

Permalink
Merge pull request #5 from saneef/chore/bump-eleventy-img
Browse files Browse the repository at this point in the history
Bumps eleventy-img
  • Loading branch information
saneef authored Aug 18, 2021
2 parents 1c2d93f + 0245491 commit 093b5b2
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
node: ["10", "12", "14"]
node: ["12", "14", "16"]
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Eleventy plugin to replace `<img>` using `<picture>` with resized and optimized

This plugin is inspired by [eleventy-plugin-local-respimg](https://github.com/chromeos/static-site-scaffold-modules/tree/main/modules/eleventy-plugin-local-respimg) by [Sam Richard](https://twitter.com/Snugug/).

Requires Node 12+

## Features

- Drop-in plugin to replace all `<img>` in your website without shortcodes.
Expand Down Expand Up @@ -44,7 +46,7 @@ module.exports = function (eleventyConfig) {
// in this array. Keep most compatible format at the end.
// The path of the last format will be populated in
// the 'src' attribute of fallback <img> tag.
formats: ["webp", "jpeg"],
formats: ["avif", "webp", "jpeg"],
sizes: "100vw", // Default image `sizes` attribute

minWidth: 150, // Minimum width to resize an image to
Expand Down
2 changes: 1 addition & 1 deletion lib/img2picture.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const defaultOptions = {
imagesOutputDir: "_site",
urlPath: "",
extensions: ["jpg", "png", "jpeg"],
formats: ["webp", "jpeg"],
formats: ["avif", "webp", "jpeg"],
sizes: "100vw",
minWidth: 150,
maxWidth: 1500,
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
"author": "Saneef Ansari <[email protected]> (https://saneef.com/)",
"license": "MIT",
"dependencies": {
"@11ty/eleventy-img": "^0.9.0",
"@11ty/eleventy-img": "^0.10.0",
"cheerio": "^1.0.0-rc.10",
"debug": "^4.3.2"
},
"devDependencies": {
"ava": "^3.15.0",
"eslint": "^7.31.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-xo-space": "^0.28.0",
"eslint-config-xo-space": "^0.29.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^6.0.0",
"image-size": "^0.9.7",
"lint-staged": "^11.0.1",
"husky": "^7.0.1",
"image-size": "^1.0.0",
"lint-staged": "^11.1.2",
"nyc": "^15.1.0",
"prettier": "^2.3.2",
"rimraf": "^3.0.2"
Expand Down
1 change: 0 additions & 1 deletion tests/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const baseConfig = {
eleventyInputDir: sourcePath,
imagesOutputDir: outputBase,
urlPath: "/images/",
formats: ["avif", "webp", "jpeg"],
filenameFormat,
dryRun: true,
};
Expand Down
1 change: 0 additions & 1 deletion tests/jpgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ test.after.always("Cleanup Output Images", async () => rimraf(outputBase));
const baseOptions = {
eleventyInputDir: sourcePath,
imagesOutputDir: outputBase,
formats: ["avif", "webp", "jpeg"],
urlPath: "/images/",
filenameFormat,
};
Expand Down
1 change: 0 additions & 1 deletion tests/pngs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ test.after.always("Cleanup Output Images", async () => rimraf(outputBase));
const baseOptions = {
eleventyInputDir: sourcePath,
imagesOutputDir: outputBase,
formats: ["avif", "webp", "jpeg"],
urlPath: "/images/",
filenameFormat,
};
Expand Down
1 change: 0 additions & 1 deletion tests/remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const baseOptions = {
eleventyInputDir: sourcePath,
imagesOutputDir: outputBase,
urlPath: "/images/",
formats: ["avif", "webp", "jpeg"],
filenameFormat,
fetchRemote: true,
cacheOptions: {
Expand Down

0 comments on commit 093b5b2

Please sign in to comment.