Generated CSS file is empty
volkanunsal opened this issue · 2 comments
As discussed here:
https://github.com/documentcloud/jammit/issues#issue/89
The css output of YUI is coming out empty when run by jammit to compress the css files. This issue could be due to a silent error or an API error.
From the commandline:
You have zero style redefenitions in your gist so that's why it returns an empty string. Try to use "h1 { color: black }"
I've met a similar error as you with my production stylesheets but the reason lies in another dimension. Since january 18 (0.9.3, 0.9.4) ruby-yui-compressor is bundled with yui compressor 2.4.4 (although current official version 2.4.2) and this version can't compress stylesheet if it contains an embedded image (i've checked with 16kb image):
$ java -jar /Users/brainopia/.rvm/gems/ruby-1.9.2-p180/gems/yui-compressor-0.9.4/lib/yui/../yuicompressor-2.4.4.jar --type css --charset utf-8 tmp/example.css
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)
Caused by: java.lang.StackOverflowError
So I suggest to rollback to official stable version of yui-compressor for now.
I think brainopia is right. This seems like a non-issue.