peteboere / css-crush

CSS preprocessor.
http://the-echoplex.net/csscrush
MIT License
537 stars 51 forks source link

Is there anything known on PhpStorm & gulp support + other minor questions? #59

Closed iby closed 10 years ago

iby commented 10 years ago

@peteboere, this looks like an awesome project. Thanks for putting it out. I've done some unsuccessful googling, so wanted to ask the following.

  1. How does it behave with PhpStorm? Is any integration, support or tips available?
  2. I guess the whole idea of this is to use it directly from the backend, but can we precompile everything if we want to, say, with gulp or grunt?
  3. Are there any case studies or who uses it and how it was a miracle for them? Just links if possible.
  4. Do you have any performance benchmarks comparing to Less or Sass? Would be interesting to see that if it exists.
peteboere commented 10 years ago

I am not a PhpStorm user myself, though the public API for Crush is pretty small so I imagine it wouldn't be very difficult to add IDE integration.

Using via grunt/gulp is feasible using the command line utility (cli.php) though no such plugins have been written as yet and it looks like grunt is being superceded by gulp. Personally I have been using the command line utility as-is when I work on Django projects, though granted, it would be nice to have a gulp/grunt integration also.

Some 'quick and dirty' benchmarking running on 2010 Macbook pro here are compile times of bootstrap-3.3.1.css (121kb)

Sass 3.3.3 (ruby 2.1.0)

1.476s 1.512s 1.527s 1.499s 1.522s

CSS-Crush 2.1 (using PHP 5.4)

1.048s 1.024s 1.045s 1.027s 1.035s

CSS-Crush 2.1 (using HHVM)

0.586s 0.580s 0.584s 0.588s 0.582s

iby commented 10 years ago

HHVM does its magic. Thanks for details, Pete. I had to stick with Less for the time being, but this looks really awesome. Somehow I feel really sorry for not using it… wtf :smile:

I'm a big Phalcon PHP fan, I feel Css Crush would be very welcomed by their community if hasn't already. The framework allows to concatenate and minify assets out of box, but this would be a killer feature along with that. In case you're interested, Phalcon incubator accepts integrations with other projects, which could gain you more users – https://github.com/phalcon/incubator