mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:22:33 +00:00
CI: Add svgo
pre-commit hook
This commit is contained in:
parent
04bf7d4cad
commit
4af1068688
@ -21,3 +21,6 @@ indent_size = 4
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.svg]
|
||||
insert_final_newline = false
|
||||
|
@ -118,6 +118,14 @@ repos:
|
||||
pass_filenames: false
|
||||
additional_dependencies: ['jsdoc@^4.0.3']
|
||||
|
||||
- id: svgo
|
||||
name: svgo
|
||||
language: node
|
||||
entry: svgo
|
||||
files: \.svg$
|
||||
args: [--quiet, --config, misc/utility/svgo.config.mjs]
|
||||
additional_dependencies: ["svgo@3.3.2"]
|
||||
|
||||
- id: copyright-headers
|
||||
name: copyright-headers
|
||||
language: python
|
||||
|
20
misc/utility/svgo.config.mjs
Normal file
20
misc/utility/svgo.config.mjs
Normal file
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
multipass: true,
|
||||
precision: 2,
|
||||
plugins: [
|
||||
{
|
||||
name: "preset-default",
|
||||
params: {
|
||||
overrides: {
|
||||
removeHiddenElems: false,
|
||||
convertPathData: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
"convertStyleToAttrs",
|
||||
"removeScriptElement",
|
||||
"removeStyleElement",
|
||||
"reusePaths",
|
||||
"sortAttrs",
|
||||
],
|
||||
};
|
Loading…
Reference in New Issue
Block a user