Esempio 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));
    }
Esempio 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);
 }
Esempio n. 3
0
 public static function compress($css)
 {
     $compressor = new CssMinifier();
     return $compressor->run($css);
 }