sproutcore / build-tools

SproutCore Build Tools
12 stars 7 forks source link

Fixes @2x css files #52

Closed nicolasbadia closed 9 years ago

nicolasbadia commented 9 years ago

The image path wasn’t replaced by the high resolution version in @2x CSS files.

This PR fixes this, but as a side effect, also double the build time!

@mauritslamers: Any idea of how we could improve this ?

mauritslamers commented 9 years ago

The most time during build is spent in minification, especially cssmin. I see only a few ways we could improve the build time:

mauritslamers commented 9 years ago

A quick search shows a few library alternatives for cssmin

nicolasbadia commented 9 years ago

Didn't though it would be because of the minification. But we could prevent having to minify both CSS version (the @2x and the normal one) by replacing the @2x URL in the minified version.

nicolasbadia commented 9 years ago

We could indeed also move to clean-css which I think is currently the best library for CSS minification, but I'm not sure it will be faster. You can compare the CSS libraries there: http://goalsmashers.github.io/css-minification-benchmark/

mauritslamers commented 9 years ago

Interesting link! Speedwise sqwish is the best by far. The question therefore is: should we go for fast or small?

nicolasbadia commented 9 years ago

Well I think we should add support for several minifiers. Until then are a ok with that changes ?