dioscouri/f3-minify
Composer 安装命令:
composer require dioscouri/f3-minify
包简介
Front-end package manager for the F3-framework
关键字:
README 文档
README
A front-end package manager for the F3 framework
Getting Started
Add this to your project's composer.json file:
{
"require": {
"dioscouri/f3-minify": "dev-master"
}
}
Use case
You want to have a single access point for all the CSS and JS from all your apps you can register them to minify and return them from a route
// tell Minify where to find Media, CSS and JS files \Minify\Factory::registerPath($this->app->get('PATH_ROOT') . "public/Theme/"); \Minify\Factory::registerPath($this->app->get('PATH_ROOT') . "public/Theme/css/"); \Minify\Factory::registerPath($this->app->get('PATH_ROOT') . "public/"); // add the media assets to be minified $files = array( 'css/style.css' ); foreach ($files as $file) { \Minify\Factory::css($file); } $files = array( 'js/script.js' ); foreach ($files as $file) { \Minify\Factory::js($file, array( 'priority' => 1 )); }
统计信息
- 总下载量: 1.2k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL
- 更新时间: 2014-05-12