-
Notifications
You must be signed in to change notification settings - Fork 16
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
Css minifier not working anymore #51
Comments
@Taxman972 Sorry to hear that! I just tested it on my local PC (Windows 7 x64, SublimeText 3) and CSS file minification worked just like before. From the error message you sent, it seems to me that there is a problem with your nodejs installation... Can you open up a CMD window and try to run the
followed by this command:
Please let me know if the above helped or not. Thanks! |
@Taxman972 Also, maybe your source CSS file is referencing another CSS file which is not present on your local disk. Search for "@import" in your source CSS file. |
Hi @tssajo I am having the same issue as @Taxman972. I have a clean install of Sublime, nodejs including all CLI and the minify package. This is the error I am getting. when running in command line I get this error I have no @import references in any of my css files Running sublime text 3 and Windows 10 |
@simontrice Thanks for the screenshots! Seems to me that it is a bug in the new clean-css-cli program. It is very likely affecting you only because you are on Windows and your CSS file is located on a different drive than the C: drive. |
Hi again @tssajo I have been doing some digging and it looks like clean-css is using the full path, including the path from the application working directory in the file output and file selection. I tested by navigating into the directory holding the css file and running clean-css from there. The file was converted successfully. I think that the package needs to make the directory containing the file to be created the working directory before calling clean-css. If I am wrong then please excuse my ignorance, I don't use python. |
@simontrice You are correct, but it seems to me that it is a bug in clean-css-cli program. I will report this bug and request a fix from the author of clean-css-cli. In the meantime, can you try to copy your project folder to the C: drive and see if it works from there? I believe that it should. Can you confirm this? As a temporary solution, please downgrade your cleancss program on you PC:
|
hi @tssajo I was writing the last comment as you were posting so missed it. I have copied the full dev directory to the C drive and get the same issue Have been trying to change version of clean-css but I have been unable to make any progress as it is giving me errors when trying to uninstall. I am going to try removing node/npm completely and trying again from scratch. I will let you know if there are any problems with the earlier version. |
change CSS minify engine to uglifycss and Wait clean CSS update |
will do and thanks for the swift response |
@simontrice The error is different on drive C: ! So I was right. :) You have another issue: spaces in your directory name. Please rename the directory to "TwoBadMice" (no spaces) and try it on drive C: |
You are correct about that, it worked perfectly. How do I change the minify engine to uglifycss edit: nvm, found it in the default settings |
@simontrice In ST go to Preferences / Package Settings / Minify / Settings -- Default then highlight everything (e.g. with Ctrl+A) and copy it into the clipboard (Ctrl+C). Close the Settings -- Default file.
and change it to:
However, I personally like clean-css better than uglifycss... Maybe you can temporary work on your C: drive until they fix clean-css-cli. I already reported the bug: clean-css/clean-css-cli#3 |
I changed to |
The issue has been fixed in version 4.0.5 of So you can change back the following line in your settings file from:
to:
Also, do not forget to update your |
In addition to the above, in version 4.0.0+ of
so I override the above in my Minify Settings -- User file with the following:
|
@tssajo I just installed a fresh version of your package, and I my CSS file was also not getting minified. I had to do this:
After that, it worked. I had to use |
@jaminroe Thanks for the report. But this is a known issue. |
Ah yes, that is what my case was. I had installed your package a while back, but reinstalled it today to make sure I had the latest version. Thanks! |
Hi,
Since the last update I can't minify any css file anymore I followed the step to install and update :
npm install -g clean-css-cli uglifycss js-beautify html-minifier uglify-js minjson svgo
npm update -g clean-css-cli uglifycss js-beautify html-minifier uglify-js minjson svgo
I even add clean-css but impossible to minify a CSS file.
Here a picture
http://imgur.com/a/70RDq
sublime text 2, windows7
The text was updated successfully, but these errors were encountered: