Exemple #1
0
 /**
  * Compiler constructor.
  *
  * @param mixed $options
  */
 public function __construct($options = array())
 {
     $yui = realpath(__DIR__) . '/../../../../../bin/yuicompresor.jar --type js --charset UTF8 ';
     $java = trim(exec("which java", $output, $return));
     if (!$java) {
         throw new Exception\ShellExec(sprintf('Java does not exist on this machine. Please install JRE. `which java` returned %s %s', $output, $return));
     }
     $options['cli_run'] = empty($options['cli_run']) ? "{$java} -jar {$yui} %s -o %s" : $options['cli_run'];
     parent::__construct($options);
 }
Exemple #2
0
 /**
  * @param array $options
  */
 public function __construct($options = array())
 {
     $options['cli_run'] = empty($options['cli_run']) ? realpath(__DIR__) . '/../../../../../bin/minify < %s > %s' : $options['cli_run'];
     parent::__construct($options);
 }