JShrink

Javascript Minifier built in PHP

  • 所有者: tedious/JShrink
  • 平台:
  • 許可證: BSD 3-Clause "New" or "Revised" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

JShrink Build Status

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.

主要指標

概覽
名稱與所有者tedious/JShrink
主編程語言PHP
編程語言PHP (語言數: 3)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2012-02-22 21:09:26
推送於2024-01-01 23:08:16
最后一次提交2023-10-04 12:23:23
發布數22
最新版本名稱v1.7.0 (發布於 )
第一版名稱v0.5.1 (發布於 2012-11-25 20:51:39)
用户参与
星數753
關注者數39
派生數148
提交數203
已啟用問題?
問題數81
打開的問題數14
拉請求數50
打開的拉請求數1
關閉的拉請求數15
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?