定制 hexydec/cssdoc 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hexydec/cssdoc

最新稳定版本:1.2.2

Composer 安装命令:

composer require hexydec/cssdoc

包简介

A token based CSS Document parser and minifier written in PHP

README 文档

README

A tokeniser based CSS document parser and minifier, written in PHP.

Licence Status: Stable Tests Status Code Coverage

Description

A CSS parser, primarily designed for minifying CSS documents.

The parser designed around a tokeniser to make the document processing more reliable than regex based minifiers, which are a bit blunt and can be problematic if they match patterns in the wrong places.

Usage

To minify a CSS document:

$doc = new \hexydec\css\cssdoc();

// load from a variable
if ($doc->load($css) {

	// minify the document
	$doc->minify();

	// compile back to CSS
	echo $doc->compile();
}

You can test out the minifier online at https://hexydec.com/apps/minify-css/, or run the supplied index.php file after installation.

Installation

The easiest way to get up and running is to use composer:

$ composer install hexydec/cssdoc

CSSdoc requires \hexydec\token\tokenise to run, which you can install manually if not using composer.

Documentation

Support

CSSdoc supports PHP version 8.0+.

Contributing

If you find an issue with CSSdoc, please create an issue in the tracker.

If you wish to fix an issues yourself, please fork the code, fix the issue, then create a pull request, and I will evaluate your submission.

Licence

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-16