This is a CodeIgniter Spark that provides jsmin.php, a PHP implementation of Douglas Crockford's JSMin by Ryan Grove, inspired by the minify
spark by Jens Segers.
First, install the spark by running
$ php tools/spark install jsmin
Then, in your code:
$this->load->spark('jsmin/1.0.7');
$minified = minifyjs($source);
First, install it by copying libraries/jsmin.php
into application/libraries
and helpers/jsmin_helper.php
into application/helpers
.
$this->load->helper('jsmin');
$minified = minifyjs($source);
An alternative to this library is the CodeIgniter driver spark by Jens Segers which inspired this one: github.com/jenssegers/CodeIgniter-Minify.
- Copyright © 2013 Ny fågel hej@nyfagel.se (CodeIgniter Spark)
- Copyright © 2012 Adam Goforth aag@adamgoforth.com (Updates)
- Copyright © 2008 Ryan Grove ryan@wonko.com (PHP port)
- Copyright © 2002 Douglas Crockford douglas@crockford.com (jsmin.c)