mirror of
https://github.com/mrclay/minify.git
synced 2025-08-08 15:16:56 +02:00
moved unit_tests to min_unit_tests
min/builder/index.php : + note about CSS imports HISTORY.txt and README.txt additions some text file renaming tools removed
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
Minify Release History
|
||||
|
||||
Version 2.1.0
|
||||
* "min" default configuration for quick deployment
|
||||
* "min" default application for quick deployment
|
||||
* Minify URI Builder app & bookmarklet for quickly creating minify URIs
|
||||
* Relative URIs in CSS file are fixed automatically
|
||||
* Conditional GETs always supported
|
||||
* Relative URIs in CSS file are fixed automatically by default
|
||||
* "debug" mode for revealing original line #s in combined files
|
||||
* Better IIS support
|
||||
* Improved minifier classes:
|
||||
@@ -12,10 +11,11 @@ Version 2.1.0
|
||||
* CSS: smaller output, preserves more hacks and valid CSS syntax,
|
||||
shorter line lengths, other bug fixes
|
||||
* HTML: smaller output, shorter line lengths, other bug fixes
|
||||
* Default Cache-Control: max-age of 30 minutes
|
||||
* Conditional GETs supported even when max-age sent
|
||||
* Experimental memcache cache class (default is files)
|
||||
* Minify_Cache_File has flock()s (by default)
|
||||
* Workaround for Windows mtime reporting bug
|
||||
* New "CSS linearizer" which processes @imports server-side
|
||||
|
||||
Version 2.0.2 beta (2008-06-24)
|
||||
* Fast new cache system. Cached files served almost 3x as fast.
|
||||
@@ -31,7 +31,8 @@ Version 2.0.0 (2008-05-22)
|
||||
* Expanded CSS and HTML minifiers with test cases
|
||||
* Easily plug-in 3rd-party minifiers (like Packer)
|
||||
* Plug-able front end controller allows changing the way files are chosen
|
||||
* Compression & encoding modules lazy-loaded as needed (304 responses use minimal code)
|
||||
* Compression & encoding modules lazy-loaded as needed (304 responses use
|
||||
use minimal code)
|
||||
* Separate utility classes for HTTP encoding and cache control
|
||||
|
||||
Version 1.0.1 (2007-05-05)
|
@@ -17,6 +17,25 @@ you to the Minify URI Builder application, which will help you
|
||||
quickly start using Minify to serve content on your site.
|
||||
|
||||
|
||||
UNIT TESTING:
|
||||
|
||||
1. Place the /min_unit_tests/ directory as a child of your DOCUMENT_ROOT
|
||||
directory: i.e. you will have: /home/user/www/public_html/min_unit_tests
|
||||
|
||||
2. To run unit tests, access: http://yourdomain/min_unit_tests/test_all.php
|
||||
|
||||
(If you wish, the other test_*.php files can be run to test individual
|
||||
components with more verbose output.)
|
||||
|
||||
3. Remove /min_unit_tests/ from your DOCUMENT_ROOT when you are done.
|
||||
|
||||
|
||||
EXTRAS:
|
||||
|
||||
The min_extras folder contains files for benchmarking using Apache ab on Windows
|
||||
and a couple single-use tools. DO NOT place this on your production server.
|
||||
|
||||
|
||||
FILE ENCODINGS
|
||||
|
||||
Minify *should* work fine with files encoded in UTF-8 or other 8-bit
|
||||
@@ -26,15 +45,3 @@ encodings like ISO 8859/Windows-1252. By default Minify appends
|
||||
Leading UTF-8 BOMs are stripped from all sources to prevent
|
||||
duplication in output files, and files are converted to Unix newlines.
|
||||
|
||||
|
||||
UNIT TESTING:
|
||||
|
||||
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
|
||||
|
||||
2. To run unit tests, access: http://yourdomain/min_extras/unit_tests/test_all.php
|
||||
|
||||
Other test_*.php files in that directory can be run to test individual
|
||||
components more verbosely.
|
||||
|
||||
After testing you should remove the min_extras directory.
|
@@ -80,6 +80,14 @@ available URIs to add.</p>
|
||||
<p><a id=bm>Create Minify URIs</a> <small>(right-click, add to favorites/bookmarks)</small></p>
|
||||
</div>
|
||||
|
||||
<h3>Combining CSS files that contain <code>@import</code></h3>
|
||||
<p>If your CSS files contain <code>@import</code> declarations, Minify will not
|
||||
remove them. Therefore, you will want to remove those that point to files already
|
||||
in your list, and move any others to the top of the first file in your list
|
||||
(imports below any styles will be ignored by browsers as invalid).</p>
|
||||
<p>If you desire, you can use Minify URIs in imports and they will not be touched
|
||||
by Minify. E.g. <code>@import "/min/?g=css2";</code></p>
|
||||
|
||||
<hr>
|
||||
<p>Need help? Search or post to the <a class=ext href="http://groups.google.com/group/minify">Minify discussion list</a>.</p>
|
||||
<p><small>This app is minified :) <a class=ext href="http://code.google.com/p/minify/source/browse/trunk/min/builder/index.php">view source</a></small></p>
|
||||
|
@@ -73,7 +73,13 @@ $min_allowDebugFlag = false;
|
||||
*
|
||||
* Immediately after modifying and uploading a file, use the touch command to
|
||||
* update the mtime on the server. If the mtime jumps ahead by a number of hours,
|
||||
* set this variable to that number. If the mtime moves back, this should not be needed.
|
||||
* set this variable to that number. If the mtime moves back, this should not be
|
||||
* needed.
|
||||
*
|
||||
* In the Windows SFTP client WinSCP, there's an option that may fix this
|
||||
* issue without changing the variable below. Under login > environment,
|
||||
* select the option "Adjust remote timestamp with DST".
|
||||
* @link http://winscp.net/eng/docs/ui_login_environment#daylight_saving_time
|
||||
*/
|
||||
$min_uploaderHoursBehind = 0;
|
||||
|
||||
|
15
min_extras/README.txt
Normal file
15
min_extras/README.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
DO NOT leave this directory on a site in production. Some scripts within may be
|
||||
resource intensive and some allow file uploads.
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
This directory contains testing scripts and a few example applications built
|
||||
with the Minify library classes.
|
||||
|
||||
ab_tests/
|
||||
Windows batch files used to benchmark various Minify and Apache
|
||||
configurations using Apache ab.
|
||||
|
||||
tools/
|
||||
Two utility web apps that upload a file, alter it, and send it back to the
|
||||
user. One applies HTTP encoding, the other minifies CSS/JS/HTML.
|
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
@@ -1,9 +1,20 @@
|
||||
<?php
|
||||
|
||||
require '../config.php';
|
||||
require dirname(__FILE__) . '/../min/config.php';
|
||||
|
||||
if (!isset($min_libPath)) {
|
||||
// default lib path is inside min
|
||||
$min_libPath = dirname(__FILE__) . '/../min/lib';
|
||||
}
|
||||
set_include_path($min_libPath . PATH_SEPARATOR . get_include_path());
|
||||
|
||||
$minifyCachePath = isset($min_cachePath)
|
||||
? $min_cachePath
|
||||
: '';
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
header('Content-Type: text/plain');
|
||||
|
||||
$thisDir = dirname(__FILE__);
|
3408
min_unit_tests/_test_files/js/jquery-1.2.3.js
vendored
Normal file
3408
min_unit_tests/_test_files/js/jquery-1.2.3.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -88,9 +88,10 @@ function test_HTTP_Encoder()
|
||||
}
|
||||
}
|
||||
|
||||
// test compression of varied content (HTML,JS, & CSS)
|
||||
$variedContent = file_get_contents($thisDir . '/_test_files/html/before.html')
|
||||
. file_get_contents($thisDir . '/_test_files/css/subsilver.css')
|
||||
. file_get_contents($thisDir . '/../ab_tests/minify/before.js');
|
||||
. file_get_contents($thisDir . '/_test_files/js/jquery-1.2.3.js');
|
||||
$variedLength = strlen($variedContent);
|
||||
|
||||
$encodingTests = array(
|
@@ -1,3 +0,0 @@
|
||||
:: Generates Minify documentation using PhpDocumentor.
|
||||
@echo off
|
||||
phpdoc -ti "Minify docs" -p on -d ../lib -t ../docs -o html:smarty:php
|
Reference in New Issue
Block a user