kamsar / Dianoga

An automatic image optimizer for the Sitecore media library.
Other
104 stars 45 forks source link

SVGO Relative Path Config #106

Closed Antonytm closed 2 years ago

Antonytm commented 2 years ago

This is an addition to https://github.com/kamsar/Dianoga/issues/104

It will be nice to be able to pass configuration filename from the same directory, where svgo-win.exe is located. Otherwise, either an absolute path should be passed or a relative path from c:\windows\system32\inetsrv (default IIS working dir), which is not convenient.

markgibbons25 commented 2 years ago

Not sure I understand this one, so relative paths still works fine? And this just checks the working (build) dir?

Antonytm commented 2 years ago

I as a developer want easy set up a path for SVGO configuration

e.g. we have path to svgo-win.exe: c:\inetpub\wwwroot\sitecore\app_data\dianoga tools\svgo\ and we make config.js to disable/enable some SVGO plugins.

Current behavior: I can use either absolute path (--config c:\inetpub\wwwroot\sitecore\app_data\dianoga tools\svgo\config.js"). Or I can use a relative path from c:\windows\system32\inetsrv (default IIS working dir) (--config "..\..\inetpub\wwwroot\sitecore\app_data\dianoga tools\svgo\config.js")

Expected behavior I want svgo-win.exe to take config from the same folder, where it is located. --config config.js

Solution The easiest way to achieve it: set up the working directory to be the same, where svgo-win.exe is located.

markgibbons25 commented 2 years ago

Pushed 6.0.0-beta.3