thumblemonks / smurf

Rails plugin to automatically minify JavaScript and CSS when their bundles get cached
http://gusg.us/code/ruby/smurf-rails-autominifying-js-css-plugin.html
MIT License
193 stars 12 forks source link

Sass support #7

Closed thijsc closed 14 years ago

thijsc commented 14 years ago

Hi,

Smurf is working great for me on the javascript files. But it doesn't seem to do anything for the CSS file, which is generated by SASS.

Is this supported?

Thanks,

Thijs

gus commented 14 years ago

I've been a bad boy by not keeping on top of these issues. Sorry.

Smurf should work with any CSS file so long as it's mentioned in the rails, stylesheet include and sass creates the CSS version as soon as you make any modifications.

To understand the problem a bit more, you:

  1. Define a SASS file, edit it, and it gets saved as CSS somewhere (parent dir probably)
  2. You stylesheet include the CSS version of the file and use the :cache option
  3. You deploy to production
  4. You make a request that would load in that CSS file, but that CSS file never gets minified in the cached output?
thijsc commented 14 years ago

No problem, thanks for the awesome plugin!

I've found out that you can modify SASS's output style, the compressed style is already minified.

I still use Smurf for the javascript files though, works very well.