Skip to content
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

Turn off CSS minification separately #162

Open
yfeldblum opened this issue Apr 8, 2011 · 6 comments
Open

Turn off CSS minification separately #162

yfeldblum opened this issue Apr 8, 2011 · 6 comments

Comments

@yfeldblum
Copy link

There should be an option to turn off CSS minification separately from JS minification. CSS files should still be concatenated into a package, just unminified.

The reason is that the YUI CSS minifier is in Java, but Java is not installed on Heroku, so CSS minification on Heroku fails. If there were an option to disable CSS minification, then all the other benefits from Jammit (JS minification, JS concatenation, CSS concatenation, etc.) could be realized on Heroku.

Cheers!

@jimmycuadra
Copy link

+1. Is there a CSS minifier that doesn't require Java? We might be able to take a similar approach as we did with the JS minification using UglifyJS.

@aaronchi
Copy link

aaronchi commented May 2, 2011

sprockets 2 in rails 3.1 is using a sass function to compress stylesheets:

Sass::Engine.new(source,
  :syntax => :scss, :style => :compressed
).render

@glebm
Copy link

glebm commented May 4, 2011

I believe rainpress: http://code.google.com/p/rainpress/ is

@glebm
Copy link

glebm commented May 4, 2011

The gem has one issue though: https://github.com/sprsquish/rainpress/issues

However, the whole code is only about 150 lines with comments, so it should be easy to fix

@jashkenas
Copy link
Member

I'm afraid that there are no robust pure-Ruby CSS compressors out there that I'm aware of. If you read the source of Rainpress, I don't think it cuts the mustard.

That said, I'd be glad to take a patch that makes Sass a configurable option as a CSS compressor alternative to YUI.

@jsmestad
Copy link

Fixing this would also remove any dependency on Java when using this on Heroku.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants