Exemplo n.º 1
0
    public function testMinify()
    {
        $jsText = '/* Some comment that should be deleted */
		function foo() {
			return "bar";
		 }';
        $this->assertEquals('function foo(){return"bar";}', JSMin::minify($jsText));
    }
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);
 }