diff --git a/HISTORY b/HISTORY index 33b645f..9ef2139 100644 --- a/HISTORY +++ b/HISTORY @@ -1,13 +1,14 @@ Minify Release History -Version 2.1.0 beta - * "min" default app for quick deployment +Version 2.1.0 + * "min" default configuration for quick deployment + * builder app for creating minify URIs * "debug" mode for revealing original line #s in combined files * Relative URIs in CSS file are fixed automatically * Conditional GETs always supported * Improved CSS/HTML minifiers * New "CSS linearizer" which processes @imports server-side - * New memcache storage class (default is files) + * Experimental memcache cache class (default is files) * Several bug fixes Version 2.0.2 beta (2008-06-24) diff --git a/README b/README index 5a798c4..aabdd77 100644 --- a/README +++ b/README @@ -4,43 +4,34 @@ Minify is an HTTP content server. It compresses sources of content (usually files), combines the result and serves it with appropriate HTTP headers. These headers can allow clients to perform conditional GETs (serving content only when clients do not have a valid cache) -or tell clients to cache the file until a given date/time. +and tell clients to cache the file for a period of time. More info: http://code.google.com/p/minify/ -INSTALLATION AND USAGE: http://code.google.com/p/minify/wiki/UserGuide +INSTALLATION AND USAGE: -UNIT TESTING & EXAMPLES: http://code.google.com/p/minify/wiki/TestingMinify +1. Place the /min/ directory as a child of your DOCUMENT_ROOT +directory: i.e. you will have: /home/user/www/public_html/min -MINIFY OVERVIEW +2. Open http://yourdomain/min/ in a web browser. This will forward +you to the Minify URI Builder application, which will help you +quickly start using Minify to serve content on your site. -Minify works with Minify_Source objects. These usually represent a file -on disk, but a source can also be a string in memory or from a database. -Sources with known "last modified" timestamps allow Minify to implement -server-side caching and conditional GETs. +UNIT TESTING: -You configure Minify via a Minify_Controller object. The controller -supplies the sources and default options to serve a request, -determining how it's to be responded to. Several controllers are -supplied with Minify, but it's also fairly easy to write your own. See -the files in /lib/Minify/Controller for examples. +1. Place the /min_extras/ directory as a child of your DOCUMENT_ROOT +directory: i.e. you will have: /home/user/www/public_html/min_extras -To use an existing controller, you call Minify::serve(), passing it: -1. the name of your controller of choice (without the "Minify_Controller" - prefix) or a custom controller object subclassed from Minify_Controller_Base. -2. a combined array of controller and Minify options. Eg.: +2. To run unit tests, access: http://yourdomain/min_extras/unit_tests/test_all.php -// serve a minified javascript file and tell clients to cache it for a -// year -Minify::serve('Files', array( - 'files' => array('/path/to/file1.js', '/path/to/file2.js') - ,'setExpires' => (time() + 86400 * 365) -)); - -The above creates an instance of Minify_Controller_Files, which creates -source objects from the 'files' option, and supplies other default options. +Other test_*.php files in that directory can be run to test individual +components more verbosely. + FILE ENCODINGS Minify *should* work fine with files encoded in UTF-8 or other 8-bit -encodings like ISO 8859/Windows-1252. Leading UTF-8 BOMs are stripped from -all sources to prevent duplication in output files. +encodings like ISO 8859/Windows-1252. By default Minify appends +";charset=utf-8" to the Content-Type headers it sends. + +Leading UTF-8 BOMs are stripped from all sources to prevent +duplication in output files, and files are converted to Unix newlines. diff --git a/min/README.txt b/min/README.txt index 85f793d..c12e819 100644 --- a/min/README.txt +++ b/min/README.txt @@ -110,5 +110,4 @@ return array( QUESTIONS? -http://groups.google.com/group/minify -steve@mrclay.org +http://groups.google.com/group/minify \ No newline at end of file diff --git a/min/builder/index.php b/min/builder/index.php index c2f76d8..bcfb03b 100644 --- a/min/builder/index.php +++ b/min/builder/index.php @@ -2,6 +2,11 @@ require dirname(__FILE__) . '/../config.php'; +if (! $min_enableBuilder) { + header('Location: /'); + exit(); +} + ob_start(); ?> _mc = $memcache; @@ -97,7 +108,7 @@ class Minify_Cache_Memcache { private $_mc = null; private $_exp = null; - // PHP memory cache of most recently fetched id + // cache of most recently fetched id private $_lm = null; private $_data = null; private $_id = null; diff --git a/min/lib/Minify/ImportProcessor.php b/min/lib/Minify/ImportProcessor.php index a3d5186..52c9571 100644 --- a/min/lib/Minify/ImportProcessor.php +++ b/min/lib/Minify/ImportProcessor.php @@ -10,7 +10,9 @@ * * @imports will be processed regardless of where they appear in the source * files; i.e. @imports commented out or in string content will still be - * processed! + * processed! + * + * This has a unit test but should be considered "experimental". * * @package Minify * @author Stephen Clay diff --git a/min/lib/Minify/Packer.php b/min/lib/Minify/Packer.php index cdf2145..3c9df9b 100644 --- a/min/lib/Minify/Packer.php +++ b/min/lib/Minify/Packer.php @@ -3,11 +3,13 @@ * Class Minify_Packer * * To use this class you must first download the PHP port of Packer - * and place the file "class.JavaScriptPacker.php" in /lib. + * and place the file "class.JavaScriptPacker.php" in /lib (or your + * include_path). * @link http://joliclic.free.fr/php/javascript-packer/en/ * * Be aware that, as long as HTTP encoding is used, scripts minified - * with JSMin will provide better client-side performance. + * with Minify_Javascript (JSMin) will provide better client-side + * performance, as they need not be unpacked in client-side code. * * @package Minify */