stolksdorf / CleanCSS

CSS beautifier and sorter for Sublime text 2
55 stars 7 forks source link

Not working on ST3 #6

Closed ajitam closed 9 years ago

ajitam commented 10 years ago

When I try to run it in ST3 I get:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 549, in run_
    return self.run(edit)
  File "/Users/john/Library/Application Support/Sublime Text 3/Packages/CleanCSS/CleanCSS.py", line 44, in run
    self.formatRegion(cssRule)
  File "/Users/john/Library/Application Support/Sublime Text 3/Packages/CleanCSS/CleanCSS.py", line 77, in formatRegion
    result = self.createPartitionedRules(result, results[1])
  File "/Users/john/Library/Application Support/Sublime Text 3/Packages/CleanCSS/CleanCSS.py", line 165, in createPartitionedRules
    result = [filterAndSortRules(lines,rl) for rl in ruleLists]
TypeError: 'NoneType' object is not iterable

I noticed that spaces (rule alignment) are added

OSX 10.7.5 Sublime Text 3 Build 3059

alejandro commented 10 years ago

Is ST3 support planned?

cirocosta commented 10 years ago

:+1: for ST3 support

jamiewilson commented 10 years ago

Please add support for ST3. This looks so awesome! Thanks for making it.

stolksdorf commented 10 years ago

Hey guys, just finished adding Less support, currently working on getting it working on ST3. Hoping it should be done by next week. Thanks for being patient!

cirocosta commented 10 years ago

That's awesome @stolksdorf

stolksdorf commented 10 years ago

Hey champs, I just pushed support for Less. I haven't had time to work on ST3 support too much, but I think I've narrowed down the issue to how I'm loading in the user settings (in ST3 this is now an async call instead of sync). If someone could take a look at my new stuff and give me some pointers I would really appreciate it.

I'm still adding features and tweaking how Less is processed, so if you have any suggestions or bugs, throw them my way!

binarykitchen commented 9 years ago

Any news on ST3 support??

znk commented 9 years ago

I second @binarykitchen, @stolksdorf your plugin is damn good. If you need help, you can write down what's left to do. Hope to see ST3 supported soon !

stolksdorf commented 9 years ago

Since I don't use ST3 nor a python developer, I haven't prioritized this. I've attempted to update it a few times, but it never went anywhere. If you guys are familiar with Python 3, I encourage you to take a look at updating it. Everything should be mostly migrate-able, but I was having issues with reading in the config file in Python 3. I hope that helps!

madr3n commented 9 years ago

Still using ST2 because of this plugin! Would really appreciate if @stolksdorf or someone else could continue with it for ST3! Havent found a plugin that does exactly what this one does!

stolksdorf commented 9 years ago

Thanks for the reminder @iRJ. I finally did the switch to ST3 last week, and your comment was the push I needed to update this. I have a pull request waiting on Package Control right now, but if you want to jump the gun you can grab a zip of it here. Let me know if it works for you!

madr3n commented 9 years ago

Thanks so much @stolksdorf !!! Would love to test it right now, but not sure how to add the plugin manually into ST3... else I will just wait for it to be available within Package control. Thanks again so much!

madr3n commented 9 years ago

Was able to install it now via Package Control for ST3, but does not seem to work. When I execute the clean_css command it doesn't do anything really.

stolksdorf commented 9 years ago

Package Control didn't properly pick up my release. Fixed it now! For me I needed to restart my Sublime after installation for it to work.

I also added the ability to change the type of character CleanCSS indents with. So you crazy cats using 3 space indents won't be left out now.

Let me know if you have any other issues, sorry this took so long!