예제 #1
0
파일: jsmin.php 프로젝트: pguilford/vcomcc
 /**
  * Minify Javascript.
  *
  * @param string $js Javascript to be minified
  * @return string
  */
 public static function minify($js)
 {
     $jsmin = new ExposeJSMin($js);
     return $jsmin->min();
 }
예제 #2
0
 protected static function minify($content, $type)
 {
     if ($type == 'css') {
         expose_import('libs.csscompressor');
         $content = ExposeCssCompressor::process($content);
         return $content;
     }
     if ($type == 'js') {
         expose_import('libs.jsmin');
         $content = ExposeJSMin::minify($content);
         return $content;
     }
 }