visonforcoding/cakeminify
最新稳定版本:0.1.3
Composer 安装命令:
composer require visonforcoding/cakeminify
包简介
Cakeminify plugin for CakePHP
README 文档
README
combine and compress your web asset resource in cakephp3+
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require visonforcoding/cakeminify
##Config
config your asset resource,create a config file named minify.php in config directory。
return[ 'minjs'=>[ 'source'=>[ '/asset/jquery/dist/jquery.js', '/asset/zui/dist/js/zui.js', '/asset/vue/dist/vue.js' ], 'desc'=>'/dist/main.js' ], 'mincss'=>[ 'source'=>[ '/asset/zui/dist/css/zui.css', '/css/view.css', ], 'desc'=>'/dist/default.css' ], ];
##shell combine and compress
bin/cake minify start
the combine file will create in your 'desc' config
##helper
call the helper function in your template
<?= $this->minify->generateAsset() ?>
##output
output is relation to the debug level
Production Mode:
<link rel="stylesheet" href="/dist/default.css"/> <script src="/dist/main.js"></script>
Development Mode:
<link rel="stylesheet" href="/asset/zui/dist/css/zui.css"/> <link rel="stylesheet" href="/css/view.css"/> <script src="/asset/jquery/dist/jquery.js"></script> <script src="/asset/zui/dist/js/zui.js"></script> <script src="/asset/vue/dist/vue.js"></script>
统计信息
- 总下载量: 1.49k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-02-18