rafie / cssminifier
Simple css minifier for Laravel
Installs: 56
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: >=5.4.0
- illuminate/support: 4.1.*
This package is auto-updated.
Last update: 2024-10-29 04:19:55 UTC
README
Simple css minifier based on GarryJones css minifer.
##Installation
In your composer.json
file, require rafie/Cssminifier
and run composer dumpautoload
.
After the download has finished, in your app/config/app.php
you need to:
- Add
Rafie\Cssminifier\CssminifierServiceProvider
to theproviders
array. - Add
'CssMin' => 'Rafie\Cssminifier\Facades\CssMin'
to thealiases
array. ( only if you want to use the static interfaceCssMin::minify(...)
)
##Usage
//through the Ioc
$cssmin = App::make("cssmin");
$cssmin->minify(
[
'path/to/file1.css',
'path/to/file2.css'
],
'output/path',
true,// (optional) remove comments or no
false // (optional) concat the resulted files into one file 'all.min.css'
);
//Through the Facade
CssMin::minify(
[
'path/to/file1.css',
'path/to/file2.css'
],
'output/path',
true,// (optional) remove comments or no
false // (optional) concat the resulted files into one file 'all.min.css'
);
##TODO write tests