-
-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize svgo config #2301
Modernize svgo config #2301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! I agree with you, that this command should definitely be used more often. As already mentioned (here), I'm not a big fan of pre-commit hooks. I would rather prefer it if we could, for example, optimise all SVG files as part of the release action.
Haven't messed with workflow actions much, but I'm pretty sure it's now setup to do just that! |
@Repiteo It looks very good, it was exactly what I initially thought. I'll test your changes soon, but I'm agreeing with you, it should work like that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the release.yml file a bit. It's important to run "git add ..." to include the changed files in the version commit. In addition, I've moved the "preversion" script into the release.yml file because it looks more structured and more clean.
Merge SuccessfulThanks for your contribution! 🎉 The changes will be part of the upcoming update on the marketplace. |
@PKief, I think this will generate a See npm/npm#8620 and npm version documentation From the docs:
Apparently, trying to
|
* Modernize svgo config * feat: update release yml --------- Co-authored-by: Philipp Kief <philipp.kief@gmx.de>
Thank you for the hint. You're right and I forgot about it. I changed it, so that all scripts are executed via "preversion" npm script. |
Using the svgo command gives a warning that
extendDefaultPlugins
is now deprecated, instead recommending the new format seen here. While doing this, I tested some other optional features that weren't yet used; after seeing that they had negligible to nonexistant impact, these options have been added:multipass
,convertStyleToAttrs
, andsortAttrs
This command should probably be getting more love, as virtually every single svg can be optimized. Maybe a pre-commit hook could be considered? I've heard good things about Husky, might look into that later 🤔