Skip to content

ronvirtudazo/CodeIgniter-Minify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

CodeIgniter Minify

A library that provides minify functions using CodeIgniter drivers. The library detects the file extension and will call the right driver to minify that file. By default a javascript en css driver is included, but custom drivers can be added.

Installation

Place the Minify folder in your application's libraries folder (or use spark).

Usage

Use direct drivers access to minify content:

// load the driver
$this->load->driver('minify');

// minify javascript content
$minified = $this->minify->js->min($content);

// minify css content
$minified = $this->minify->css->min($content);

If you want to minify an existing file you can use the global min() function. Using the file's extension the correct driver is selected.

// load the driver
$this->load->driver('minify');

// minify a file
$minified = $this->minify->min('path/to/file');

About

A library that provides minify functions using CodeIgniter drivers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published