blood72 / laravel-blade-minify-compiler
对 Laravel Blade 进行压缩编译
v2.2.0
2022-01-13 15:21 UTC
Requires
- php: >=7.3
- blood72/blade-minify: ^1.4
- illuminate/view: ^7.0|^8.0|^9.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.15
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^8.5|^9.0
This package is auto-updated.
Last update: 2024-09-13 21:12:32 UTC
README
用于个人使用的 Laravel Blade 压缩编译器
索引
要求
- PHP >= 7.3
- Laravel ^7.0 | ^8.0 | ^9.0
- blood72/blade-minify ^1.4
安装
使用 composer 安装。
composer require blood72/laravel-blade-minify-compiler
配置
# enable/disable blade minifier (true/false) BLADE_MINIFY_ENABLED=true
您可以根据以下示例自定义 CSS、JS 压缩器。
// 'options' => [], 'options' => [ 'cssMinifier' => [\Minify_CSSmin::class, 'minify'], 'jsMinifier' => function ($contents) { return \JSMin\JSMin::minify($contents); }, // you can use callback ],
您可以发布配置文件。
php artisan vendor:publish --provider="Blood72\Minify\Compilers\BladeCompilerServiceProvider"
参考
许可证
本软件包是开源软件,采用 MIT 许可证授权。