Skip to content

Commit 98c9dfb

Browse files
committed
Tweak Sharp Settings
1 parent cf628d2 commit 98c9dfb

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

index.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ let { abort } = require("faucet-pipeline-core/lib/util");
99
// to be compiled with additional stuff
1010
let settings = {
1111
svg: {
12-
plugins: svgo.extendDefaultPlugins([
12+
plugins: [
13+
"preset-default",
14+
1315
// do not remove title and desc for accessibility reasons
1416
{
1517
name: "removeTitle",
@@ -34,10 +36,17 @@ let settings = {
3436
name: "collapseGroups",
3537
active: false
3638
}
37-
])
39+
]
40+
},
41+
png: {
42+
compressionLevel: 9,
43+
adaptiveFiltering: true,
44+
palette: true
45+
},
46+
jpeg: {
47+
progressive: true,
48+
mozjpeg: true
3849
},
39-
png: { adaptiveFiltering: true },
40-
jpeg: { progressive: true },
4150
webp: {},
4251
avif: {}
4352
};

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
},
2121
"homepage": "https://www.faucet-pipeline.org",
2222
"dependencies": {
23-
"faucet-pipeline-core": "^1.4.0",
24-
"sharp": "^0.27.2",
25-
"svgo": "^2.2.2"
23+
"faucet-pipeline-core": "^1.7.0",
24+
"sharp": "^0.30.1",
25+
"svgo": "^2.8.0"
2626
},
2727
"devDependencies": {
28-
"eslint-config-fnd": "^1.10.0",
28+
"eslint-config-fnd": "^1.12.0",
2929
"file-type-cli": "^6.0.0",
3030
"json-diff": "^0.7.1",
3131
"npm-run-all": "^4.1.5",

0 commit comments

Comments
 (0)