Permalink
Browse files

fixed compress depreciation error by implementing less-plugin-clean-css

  • Loading branch information...
NickWoodhams committed Jan 6, 2015
1 parent 838df68 commit 68ede6ebe61770aa08138071c74803719a0ad064
Showing with 5 additions and 1 deletion.
  1. +4 −0 README.md
  2. +1 −1 lesscompiler.py
@@ -29,6 +29,10 @@ Less2Css requires lessc to compile less to css.
npm install less -gd
4. Install less-plugin-clean-css
npm install -g less-plugin-clean-css
### Windows
@@ -181,7 +181,7 @@ def convertLess2Css(self, lessc_command, dirs, file='', minimised=True, outputFi
# check if the compiler should create a minified CSS file
if minimised:
# create the command for calling the compiler
cmd = [lessc_command, less, css, "-x", "--verbose"]
cmd = [lessc_command, less, css, "--clean-css", "--verbose"]
# when running on Windows we need to add an additional parameter to the call
if platform_name == 'Windows':
cmd[3] = '-compress'

8 comments on commit 68ede6e

@nabi009

This comment has been minimized.

nabi009 replied Jan 27, 2015

I face with this error
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .btn-xs' has no matches
extend ' .btn-sm' has no matches
extend ' .btn-lg' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .img-responsive' has no matches
extend ' .clearfix' has no matches
extend ' .clearfix' has no matches
extend ' .img-responsive' has no matches
The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.

@roamn

This comment has been minimized.

roamn replied Mar 10, 2015

if platform_name == 'Windows':
cmd[3] = "--clean-css"
...and it's work on windows

@neatville

This comment has been minimized.

neatville replied Mar 10, 2015

Right now I just want Sublime Text to allow compression when compiling less. I use Ubuntu. After Googling I found this. I was hoping that plugins that you could install from the Package Manager could take care of it all.

@zulrang

This comment has been minimized.

zulrang replied Mar 14, 2015

Was still getting this error in Windows.

roamn's fix worked for me.

@roamn

This comment has been minimized.

roamn replied Mar 14, 2015

Removed deprecated parameters and add clean-css.
roamn@9a06ff3

@midweststudios

This comment has been minimized.

midweststudios replied May 13, 2015

Where can I make this update after the package has already been installed? I've since installed the "less-plugin-clean-css" as well.

@roamn

This comment has been minimized.

roamn replied May 13, 2015

You need to open Sublime Text 3\Data\Installed Packages\Less2Css.sublime-package with archiver.
I use Total Commander file manager.
In this file edit lesscompiler.py and update.
If you use Sublime for editing, create a copy of Less2Css.sublime-package and work with it, and after editing, close Sublime and replace original Less2Css.sublime-package to edited.

@nicolas-ivanov

This comment has been minimized.

nicolas-ivanov replied May 25, 2015

The location of lesscompiler.py file In Ubuntu: .config/sublime-text-3/Installed Packages/Less2Css.sublime-package
Alternatively, press Preference > Browse Packages... in your Sublime Text and then go one level up to Installed Packages folder where Less2Css package is located.

Please sign in to comment.