peehaa/minifine 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

peehaa/minifine

最新稳定版本:2.0.0

Composer 安装命令:

composer require peehaa/minifine

包简介

Minifier for web resources

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage GitHub license

Installation

Simply include this library into your projects using composer:

"require": {
    "peehaa/minifine": "^2"
},

Requirements

PHP 7+

Usage

Basic usage

Only a couple of lines are needed to use Minifine. First an instance needs to be created. After that you can start combining and minifying resources:

<?php
$minifier = (new \Minifine\Factory())->build('/path/to/resources', true);

<head>
    <meta charset="UTF-8">
    <title>Page title</title>
    <?= $minifier->css(['/css/bootstrap.min.css', '/css/jquery.ui.min.css', '/css/theme.css', '/css/custom.css'], '/css/min.css'); ?>
</head>

results in:

<head>
    <meta charset="UTF-8">
    <title>Page title</title>
    <link rel="stylesheet" href="/css/min.css">
</head>

And:

        <?= $minifier->js(['/js/jquery-1.11.2.min.js', '/js/bootstrap.min.js', '/js/custom.js'], '/js/min.js'); ?>
    </body>
</html>

results in:

        <script src="/js/min.js"></script>
    </body>
</html>

For more advanced usages like using different minifiers and/or chaining minifiers please consult the documentation.

Documentation

The documentation (including the contribution guidelines) can be found on the project's website.

License

MIT

统计信息

  • 总下载量: 104
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-02