Skip to content
Simple Kohana 3 Minify Wrapper
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
classes
config
README.md

README.md

Kohana 3.0 Minify Module

Simple Minify wrapper for Kohana 3. Yet basically tailored to suit my needs in a specific project.

Usage

// Minify given string / file contents
$min = Minify::factory('js')->set( $filecontents )->min();
$min = Minify::factory('css')->set( $filecontents )->min(); 

// Minify list of files; 
//write result into media folder as defined in config
// use md5 hash of filelist and apps build number as filename

Controller::after()  
$this->template->jsFiles = Minify::factory('js')->minify( $this->template->jsFiles, $build );
$this->template->cssFiles = Minify::factory('css')->minify( $this->template->cssFiles, $build );

Credits

BASED ON THE JSMIN CODE BY rgrove: http://code.google.com/p/jsmin-php

BASED ON THE CSSMIN CODE BY joe.scylla: http://code.google.com/p/cssmin

BASED ON THE Kohana 2 Minify Driver by Tom Morton

Something went wrong with that request. Please try again.