Minifine combines and minifies your javascript, css and html files used in your web application on the fly.


To start using using Minifine using the default minifiers simply use the factory to create a new Minifine instance:

$minifier = (new \Minifine\Factory())->build(__DIR__, true);

To combine and minify for example multiple stylesheet simply run the following code:

<?= echo $minifier->css(['/css/bootstrap.min.css', '/css/custom.css'], '/css/min.css'); ?>

Combining and minifying javascript files works in exactly the same way:

<?= echo $minifier->js(['/js/bootstrap.min.js', '/js/custom.js'], '/js/min.js'); ?>