Exemplo n.º 1
0
    public function testMinify()
    {
        $cssMin = new CSSMin();
        $cssText = '/* Some comment that should be deleted */
		.foo {
		 	display:block; 
		 }';
        $this->assertEquals('.foo{display:block}', $cssMin->run($cssText));
    }
Exemplo n.º 2
0
 public function filterDump(AssetInterface $asset)
 {
     switch ($this->type) {
         case 'css':
             $cssMin = new CSSMin();
             $content = $cssMin->run($asset->getContent());
             break;
         case 'js':
             $content = JSMin::minify($asset->getContent());
             break;
     }
     $asset->setContent($content);
 }
Exemplo n.º 3
0
 public static function compress($css)
 {
     $compressor = new CssMinifier();
     return $compressor->run($css);
 }