Skip to content

Commit

Permalink
build: 📦️ update SVGO settings
Browse files Browse the repository at this point in the history
Signed-off-by: WaitSpring <[email protected]>
  • Loading branch information
WaitSpringQW committed Nov 18, 2023
1 parent f270c50 commit 546369e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .svgo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

// https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
module.exports = {
js2svg: {
eol: 'lf',
finalNewline: false,
indent: '\t'
},
multipass: true,
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false
}
}
},
'removeRasterImages',
'sortAttrs'
]
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint:styles": "stylelint \"**/*.{less,css}\"",
"lint:i18n": "banana-checker --requireLowerCase=0 i18n/",
"doc": "jsdoc -c jsdoc.json",
"minify-svg": "svgo --quiet --recursive --folder resources/",
"minify-svg": "svgo --config=.svgo.config.js --quiet --recursive --folder resources/",
"test": "npm run lint",
"prepare": "husky install",
"release": "standard-version",
Expand Down

0 comments on commit 546369e

Please sign in to comment.