PHP code example of momentum81 / php-remove-unused-css
1. Go to this page and download the library: Download momentum81/php-remove-unused-css 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/ */
momentum81 / php-remove-unused-css example snippets
php
$removeUnusedCss = new \Momentum81\PhpRemoveUnusedCss\RemoveUnusedCssBasic();
$removeUnusedCss->whitelist('.fab', '.far', '.fal')
->styleSheets(public_path('**/*.css'))
->htmlFiles(resource_path('**/*.blade.php'))
->setFilenameSuffix('.refactored.min')
->minify()
->refactor()
->saveFiles();
php
$removeUnusedCss = new \Momentum81\PhpRemoveUnusedCss\RemoveUnusedCssBasic();