ST3 on Windows 7. Installed Minify with package control. Followed the directions and did npm install -g clean-css-cli uglifycss js-beautify html-minifier uglify-js minjson svgo
from the command window. Checked the --version
on all of those packages and they didn’t report any errors.
Restarted ST3 and tried several tests for minify. The following worked js, json, and html. But css and svg didn’t.
For css files, a name.min.css file is created/opened, but it is empty. I checked the ST console and don’t see any errors, nor is any alert window raised.
I don’t use svg so that isn’t really a problem, but I’ll report what I experience in case it helps to diagnose the issue. No file is create/opened and I get the following alert window (edited a bit for brevity…
Error no such file or directory \path\test.min.svg at checkOptimizeFileError
.....\npm\node_modules\svgo\lib\svgo\coa.js:465:31 at readFile.then.error
.....\npm\node_modules\svgo\lib\svgo\coa.js:378.18 at <anonymous>
I found this discussion from about a year ago. It says that it is a bug in clean-css-cli (at least for the css part). I did the following:
npm uninstall -g clean-css-cli
npm install -g clean-css@3.4.24
And then my css minify did work.
Further down in the thread it mentions that the issue was fixed in 4.0.5. The version I have if I don’t roll back is 4.1.10. Which still seems broken? For now I guess I’ll roll back to 3.4.24. But any suggestions?