PHP code example of drupaljedi / css-tree-shaking

1. Go to this page and download the library: Download drupaljedi/css-tree-shaking 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/ */

    

drupaljedi / css-tree-shaking example snippets




rupalJedi\CssTreeShaking;

$cssShaker = new CssTreeShaking($html);
$optimizedHtml = $cssShaker->shakeIt();

$optimizedHtml = $cssShaker->shakeIt(TRUE);