-
Notifications
You must be signed in to change notification settings - Fork 45
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
Switch from SVGOP Back to SVGO #104
Comments
SVGO 2 has to be installed via NPM , it's not feasible to embed it into a nuget package anymore. |
Ok, I got you. How about packaging Nowadays it is very easy: Basically, there are just 2 lines of code:
|
I have created PR that is using svgo-win.exe that I got using the approach described above. |
#104 Replace svgop.exe with svgo-win.exe
Great find thanks mate, released in 6.0.0-beta.2 |
Version of Dianoga
5.4.1
Environment description:
Sitecore 9
What configs you have enabled
Standard. Only Dianoga.Svg.config is enabled
Reproducible steps (1... 2... 3...) that cause the issue
--disable=removeViewBox
argument toAdditionalToolArguments
This is configured based on examples in
SvgOptimizerTests.cs
.What you expected to see, versus what you actually saw
Expected result:
viewBox
property inside SVG file should not be touched.Actual result:
viewBox
property is removed.If we look on https://github.com/twardoch/svgop/blob/master/src/app/svgop-pkg.js we understand why it doesn't work. Configs are baked in to .exe.
Relevant logs
No logs.
Test should fail
There is a test
that run
svgop.exe
with--disable=removeViewBox
args. But if we checknew StreamReader(args.Stream).ReadToEnd()
we will see thatviewBox
was removed from test image.My thoughts
I think that we need to revert back to SVGO from SVGOP.
The text was updated successfully, but these errors were encountered: