This CLI tool efficiently minifies CSS files using PHP. It's perfect for PHP development environments needing quick, dependency-free CSS compression. The lightweight CSS Minifier CLI processes one or more CSS files, removing whitespace, comments, and formatting to output minified CSS.
- No external dependencies: Pure PHP solution.
- Batch processing: Minify multiple CSS files at once.
- CLI usage: Simple command-line interface for rapid workflow integration.
- PHP 7.0 or higher
- CLI access to your development machine
php cssminifier.php input1.css input2.css ...
This creates the output file: input.min.css, input2.min.css....
input.css
: The CSS file(s) to minify. You can pass one or more files.
Minify a single file
php cssminifier.php styles.css
Minify multiple files:
php cssminifier.php reset.css main.css
Minify all css files :
php cssminifier.php *.css
If you liked and found this repository useful for your projects, star it. Thank you for your support! ⭐