openpsa / jsgrid

Fork of last jqGrid version before license change
http://openpsa.github.io/jsgrid/
Other
28 stars 12 forks source link

minifying css after (instead of) less #117

Open bouks opened 9 years ago

bouks commented 9 years ago

I've tested some css condensers and minifiers. This one is very good : https://github.com/rstacruz/css-condense

It minifies PLUS it condense rules via selectors and definitions : https://github.com/rstacruz/css-condense#consolidation-via-selectors

I've tested with our css it's cool. Build in two steps :

lessc css.less > css.css
cssc css.css > css-min.css
bouks commented 9 years ago

It's also possible to condense rules without compressing :

lessc css.less > css.css
cssc --no-compress css.css > css-condensed.css

Note : it's not possible to do that

cssc --no-compress css.css > css.css

But it is possible to pipe

bouks commented 9 years ago

@flack proposed : https://github.com/openpsa/jsgrid/issues/116#issuecomment-73407296

I tested css-purge because it's automated so can be part of a builder. Saved about 4.5kB and 200 lines. Result looking good in navigator. I notice one problem, it doesn't minify.

But i've found this, not tested : https://github.com/ajkochanowicz/gulp-css-purge