Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lablnet/php-minify
Minify your code commpress the size, increased speed
https://github.com/lablnet/php-minify
classes compresed free html master minify oop php reduce
Last synced: 2 months ago
JSON representation
Minify your code commpress the size, increased speed
- Host: GitHub
- URL: https://github.com/lablnet/php-minify
- Owner: lablnet
- License: mit
- Created: 2018-07-25T04:34:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-23T10:50:40.000Z (almost 5 years ago)
- Last Synced: 2024-09-21T23:48:32.348Z (4 months ago)
- Topics: classes, compresed, free, html, master, minify, oop, php, reduce
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# PHP Minify
Minify your code with php## Requirement
1. PHP 7 (7.3 Recommanded).
2. Composer.## Insallation
Installing this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run:
``` composer require lablnet/minify```## Feature
- Minify HTML
- Minify CSS
- Minify JavaScript## Example
```php
htmlMinify('test.html');
$file = $minify->cssMinify("test.html");
$file = $minify->javascriptMinify("test.html");var_dump($file);
```
```test.html```
```htmlIm not mainfied
/*im comments in css block */
body {
background-color: black;
color: white;
/*display: inline-flex;*/
}
Im heading
Im paragraph
/* im script */
document.getElementById('demo').innerHTML = 'Hello JavaScript';```
## Methods
- `htmlMinify($file, $type)` Minify HTML code, `$file` file path or code, `$type` supported, file, code.
- `cssMinify($file, $type)` Minify CSS code, `$file` file path or code, `$type` supported, file, code.
- `javascriptMinify($file, $type)` Minify JS code, `$file` file path or code, `$type` supported, file, code.## Contributions
There is still a lot of work to do, so feel free to contribute to open `PR`
## License
MIT
## Support
Donate coffee?
here is the bitcoin address
[![Balance](https://img.balancebadge.io/btc/37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV.svg)](https://img.balancebadge.io/btc/37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV.svg)```37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV```
Thanks you so much.## Disclaimer
**I don't Accept any responsibility for any illegal usage**