Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christianklisch/slim-minify
PHP slim framework middleware to minify HTML output
https://github.com/christianklisch/slim-minify
Last synced: 3 months ago
JSON representation
PHP slim framework middleware to minify HTML output
- Host: GitHub
- URL: https://github.com/christianklisch/slim-minify
- Owner: christianklisch
- License: mit
- Created: 2014-06-18T06:59:42.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-06-07T15:08:31.000Z (over 3 years ago)
- Last Synced: 2024-04-24T01:02:37.457Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 22.5 KB
- Stars: 37
- Watchers: 3
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-slim - Slim Minify - Slim middleware to minify HTML output generated by the slim. (Middlewares)
README
slim-minify
===========Slim middleware to minify HTML output generated by the slim PHP framework. It removes whitespaces, empty lines, tabs
beetween html-tags and comments to reduce traffic. This script is a summary of stackoverflow answers.## Requirements
* PHP Version >= 7.2
* Slim Version >= 4.0## Usage
Copy the file Minify.php to 'Slim/Middleware/'. Register minify via $app->add():
or use the composer:
```
"require": {
"christianklisch/slim-minify": "0.7.0"
}
```in 'src/middleware.php':
```php
$app->add(new \Slim\Middleware\Minify() );
```to deactivate minified output:
```php
$app->add(new \Slim\Middleware\Minify(false);
```## Contributors
* Christian Klisch https://www.christian-klisch.de
## Copyright and license
Copyright 2014 released under [MIT](LICENSE) license.