承接 secra/caching-proxy 相关项目开发

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

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

secra/caching-proxy

Composer 安装命令:

composer require secra/caching-proxy

包简介

Converts a bunch of .css/.js files to one minified file and precompress them with gzip. Rewrite all relative path of ressources in css files.

README 文档

README

Scrutinizer Quality Score Code Coverage

Caching Proxy Class

The CachingProxy include css and js files in other php scripts and build a path to the files, with an timestamp of the last modification in it.

Main features are

  • detect last version of .css and .js Source files
  • detect .min version of .css and .js files
  • combine all .css and .js files to one cached file
  • auto create gzip version of cached file
  • depend on mod rewrite and browser, deliver precompressed files
  • debugmode for development and native, unmodified inclusion of files

Usage

For .css files use the following code in the head of your webpage. The usage for .js should be obvious.

// set the path to you webserver document root most of the time $_SERVER["DOCUMENT_ROOT"]
// and in 2. parameter the path, were you would like to store your cached files absolut from document root
$css_cache = new \secra\CachingProxy\CssCachingProxy($_SERVER["DOCUMENT_ROOT"], "/path/to/css/cache");

// Add some files
$css_cache->addFile("/path/to/file1.css");
$css_cache->addFile("/path/to/file2.css");

// Do the packing work and print the html into the head
echo $css_cache->getIncludeHtml();

Demo page

The /demo folder contain a sample webpage with the CSS and Javascript.

Changelog

###Version 1.0 (04. Jan 2021)

  • Upgrade PHP Version
  • Switch to docker for local demo

###Version 0.2 (18. July 2014)

  • Rewrite relative path of ressources in css files

###Version 0.1 (16. February 2014)

  • Add Composer Support
  • PSR-4 compatible
  • EditorConfig Support
  • Add Licence Text
  • Add usage example in readme

Developer notes

See Developer_Info.md under folder vagarnt-vm

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固