1. Go to this page and download the library: Download dumkaaa/bxoptimize library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dumkaaa / bxoptimize example snippets
$path = 'path/to/dir'; // пусть к папке для поиска файлов (обязательный)
$finder = new \Dumkaaa\BxOptimize\Finder\FilesFinder($path);
$handlers = [ //массив обработчиков (необязательный, по умолчанию - все)
'image',
'css',
];
$handler = new \Dumkaaa\BxOptimize\Handler\HandlerProcessor($handlers);
$optimizer = new \Dumkaaa\BxOptimize\Optimizer($finder, $handler);
$optimizer->optimize();