rafie/cssminifier
Composer 安装命令:
composer require rafie/cssminifier
包简介
Simple css minifier for Laravel
README 文档
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\CssminifierServiceProviderto theprovidersarray. - Add
'CssMin' => 'Rafie\Cssminifier\Facades\CssMin'to thealiasesarray. ( 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
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-05-03