2017 © Pedro PelĂĄez
 

library 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.

image

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.

  • Thursday, October 9, 2014
  • by sebkrueger
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 8 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

CachingProxy

Scrutinizer Quality Score Code Coverage, (*1)

Caching Proxy Class, (*2)

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., (*3)

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., (*4)

// 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., (*5)

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, (*6)

The Versions

09/10 2014

dev-master

9999999-dev

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.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js zip minify combine compress gzip pack packing precompress

25/06 2014

dev-development

dev-development

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.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js zip minify combine compress gzip pack packing precompress

25/06 2014

v0.2.3

0.2.3.0

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.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js zip minify combine compress gzip pack packing precompress

19/06 2014

v0.2.2

0.2.2.0

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.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js zip minify combine compress gzip pack packing precompress

19/06 2014

v0.2.1

0.2.1.0

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.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js zip minify combine compress gzip pack packing precompress

18/06 2014

v0.2

0.2.0.0

Converts a bunch of .css/.js files to one minified file

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js gzip pack packing

18/02 2014

v0.1.1

0.1.1.0

Converts a bunch of .css/.js files to one minified file

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

css caching packer js gzip pack packing

16/02 2014

v0.1

0.1.0.0

Converts a bunch of .css/.js files to one minified file

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

css caching packer js gzip pack packing