nervo / yuicompressor

16 stars 4 forks source link

Update composer.json #3

Closed SerafimArts closed 9 years ago

SerafimArts commented 9 years ago

Add binary

nervo commented 9 years ago

Great idea !

SerafimArts commented 9 years ago

What about extend this idea and add php class wrapper? =) as example:

class Yui
{
  public static function compress($inputFile, $output)
  {
    exec('java -jar yuicompressor.jar ****** // etc
  }
}
nervo commented 9 years ago

I would say it depends of your usage of yuicompressor. For instance, we used (i say "used", because we are now using npm packages for this) it with assetic, where you just have to declare the jar path. I'm not against a wrapper, but with a more solid approach. Things like a class named "YuiCompressor" instead of just "Yui", a compress method not static (so that you can pass some parameters to the constrcutor) ,an adapter system to allow usage of third party libraries like process (http://symfony.com/doc/current/components/process.html), a logger, etc...

nervo commented 9 years ago

I'm curious : what is your usage of yuicompressor ?