承接 effectra/minifyer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

effectra/minifyer

最新稳定版本:v1.0.0

Composer 安装命令:

composer require effectra/minifyer

包简介

The Effectra Minifyer package.

README 文档

README

The Minify class provides methods to minify HTML, JSON, and CSS content.

Usage

<?php

use Effectra\Minifyer\Minify;

// Minify HTML
$htmlContent = '<html>...</html>';
$minifiedHtml = Minify::html($htmlContent);

// Minify JSON
$jsonContent = '{"key": "value"}';
$minifiedJson = Minify::json($jsonContent);

// Minify CSS
$cssContent = 'body { color: red; }';
$minifiedCss = Minify::css($cssContent);

Methods

html(string $content): string

Minify HTML content by removing unnecessary whitespace and comments.

Parameters:

  • $content (string): The HTML content to be minified.

Returns:

  • (string): The minified HTML content.

json(string $content): string

Minify JSON content by decoding and then encoding it.

Parameters:

  • $content (string): The JSON content to be minified.

Returns:

  • (string): The minified JSON content.

css(string $content): string

Minify CSS content by removing unnecessary whitespace and line breaks.

Parameters:

  • $content (string): The CSS content to be minified.

Returns:

  • (string): The minified CSS content.

Please make sure to adjust the code and descriptions as needed for your specific use case. Let me know if you need any further assistance! "# minifyer"

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-20