method minify documentation in bbn\Cdn\Compiler

Minify the given string in the given lang (js or css).

function(string $st, string $lang) { $tmp = false; $st = trim($st); if ($st) { try { if ($lang === 'js') { $tmp = Minifier::minify($st, ['flaggedComments' => false]); } elseif ($lang === 'css') { /** @todo Minification makes var() statements disappear! */ $tmp = Str::cleanSpaces($st);//CssMin::minify($st); } } catch (\Exception $e) { $this->setError("Error during $lang minification with string - {$e->getMessage()}"); //die('Error during $lang minification with string - '.$e->getMessage()); } } return $tmp ?: $st; }

Minify the given string in the given lang (js or css). BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.