承接 tedivm/jshrink 相关项目开发

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

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

tedivm/jshrink

最新稳定版本:v1.8.1

Composer 安装命令:

composer require tedivm/jshrink

包简介

Javascript Minifier built in PHP

README 文档

README

License Latest Stable Version Coverage Status Total Downloads

JShrink is a php class that minifies javascript so that it can be delivered to the client quicker. This code can be used by any product looking to minify their javascript on the fly (although caching the results is suggested for performance reasons). Unlike many other products this is not a port into php but a native application, resulting in better performance.

Usage

Minifying your code is simple call to a static function-

<?php
include('vendor/autoload.php');

// Basic (default) usage.
$minifiedCode = \JShrink\Minifier::minify($js);

// Disable YUI style comment preservation.
$minifiedCode = \JShrink\Minifier::minify($js, array('flaggedComments' => false));

Results

  • Raw - 586,990
  • Gzip - 151,301
  • JShrink - 371,982
  • JShrink and Gzip - 93,507

Installing

Composer

Installing JShrink can be done through a variety of methods, although Composer is recommended.

"require": {
  "tedivm/jshrink": "~1.0"
}

Github

Releases of JShrink are available on Github.

License

JShrink is licensed under the BSD License. See the LICENSE file for details.

In the spirit of open source, use of this library for evil is discouraged but not prohibited.

Reporting Security and Vulnerability Issues

This project utilizes the Tidelift Security Reporting System for security and vulnerability reporting.

Support

Issues can be opened directly in Github for issues that aren't related to security.

Professionally supported JShrink is now available with Tidelift.

统计信息

  • 总下载量: 36.15M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 773
  • 点击次数: 1
  • 依赖项目数: 153
  • 推荐数: 12

GitHub 信息

  • Stars: 760
  • Watchers: 38
  • Forks: 147
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-01-04