mirror of
https://github.com/mrclay/minify.git
synced 2025-08-12 09:05:08 +02:00
Merge branch '3.x'
This commit is contained in:
26
HISTORY.md
26
HISTORY.md
@@ -1,18 +1,20 @@
|
||||
## Version 3.0.0 (unreleased)
|
||||
* The project root is now what is deployed as `min`
|
||||
## Version 3.0.0 (2017-04-03)
|
||||
* Improved CSS minification via Túbal Martín's CSSMin
|
||||
* Easier error identification (just see error_log)
|
||||
* Adds feature to serve static files directly
|
||||
* Installation requires use of Composer to install dependencies
|
||||
* Removes JSMin+ (unmaintained, high memory usage)
|
||||
* Removes DooDigestAuth
|
||||
* Removes Minify_Loader (uses Composer)
|
||||
* Removes Minify_Logger (uses Monolog)
|
||||
* Removes `$min_libPath` option
|
||||
* The Minify, source, and controller components have changed APIs
|
||||
* Better CSS minification via Túbal Martín's CSSMin
|
||||
* Add config option for simply concatenating files
|
||||
* Add config option for altering creation of Minify/MinApp objects
|
||||
* Adds config option for simply concatenating files
|
||||
* Adds config option for altering creation of Minify/MinApp objects
|
||||
* Missing spec no longer redirects, instead links to docs
|
||||
* Installation requires use of Composer to install dependencies
|
||||
* Minify::VERSION is an int that tracks the major version number
|
||||
* BREAKING: The project root is now what gets deployed as `min`
|
||||
* BREAKING: Removes JSMin
|
||||
* BREAKING: Removes JSMin+ (unmaintained, high memory usage)
|
||||
* BREAKING: Removes DooDigestAuth
|
||||
* BREAKING: Removes Minify_Loader (uses Composer)
|
||||
* BREAKING: Removes Minify_Logger (uses Monolog)
|
||||
* BREAKING: Removes `$min_libPath` option
|
||||
* BREAKING: The Minify, source, and controller components have changed APIs
|
||||
|
||||
## Version 2.3.0 (2016-03-11)
|
||||
* Adds `$min_concatOnly` option to just concatenate files
|
||||
|
12
README.md
12
README.md
@@ -21,20 +21,20 @@ Post to the [Google Group](http://groups.google.com/group/minify).
|
||||
|
||||
## Installation
|
||||
|
||||
See the [install guide](https://github.com/mrclay/minify/blob/master/docs/Install.wiki.md).
|
||||
See the [install guide](docs/Install.wiki.md).
|
||||
|
||||
## Configuration & Usage
|
||||
|
||||
(Using 2.x? [Here are the 2.x docs](https://github.com/mrclay/minify/tree/2.x/docs).)
|
||||
|
||||
See the [user guide](https://github.com/mrclay/minify/blob/master/docs/UserGuide.wiki.md).
|
||||
See the [user guide](docs/UserGuide.wiki.md).
|
||||
|
||||
Minify also comes with a [URI Builder application](https://github.com/mrclay/minify/blob/master/docs/BuilderApp.wiki.md) that can help you write URLs
|
||||
Minify also comes with a [URI Builder application](docs/BuilderApp.wiki.md) that can help you write URLs
|
||||
for use with Minify or configure groups of files.
|
||||
|
||||
See the [cookbook](https://github.com/mrclay/minify/blob/master/docs/CookBook.wiki.md) for more advanced options for minification.
|
||||
See the [cookbook](docs/CookBook.wiki.md) for more advanced options for minification.
|
||||
|
||||
More [docs are available](https://github.com/mrclay/minify/tree/master/docs).
|
||||
More [docs are available](docs).
|
||||
|
||||
## Unit Testing
|
||||
|
||||
@@ -43,7 +43,7 @@ More [docs are available](https://github.com/mrclay/minify/tree/master/docs).
|
||||
|
||||
## Warnings
|
||||
|
||||
* Minify is designed for efficiency, but, for very high traffic sites, it will probably serve files slower than your HTTPd due to the CGI overhead of PHP. See the [FAQ](https://github.com/mrclay/minify/blob/master/docs/FAQ.wiki.md#how-fast-is-it) and [CookBook](https://github.com/mrclay/minify/blob/master/docs/CookBook.wiki.md) for more info.
|
||||
* Minify is designed for efficiency, but, for very high traffic sites, it will probably serve files slower than your HTTPd due to the CGI overhead of PHP. See the [FAQ](docs/FAQ.wiki.md#how-fast-is-it) and [CookBook](docs/CookBook.wiki.md) for more info.
|
||||
* If you combine a lot of CSS, watch out for [IE's 4096 selectors-per-file limit](http://stackoverflow.com/a/9906889/3779), affects IE 6 through 9.
|
||||
* Minify *should* work fine with files encoded in UTF-8 or other 8-bit encodings like ISO 8859/Windows-1252. By default Minify appends ";charset=utf-8" to the Content-Type headers it sends.
|
||||
|
||||
|
@@ -26,7 +26,7 @@ Short answer: **use Minify 2.1.4+, use a pre-compressed version of your file, an
|
||||
|
||||
If the error is in your code, enable [debug mode](Debugging.wiki.md) while debugging your code in Firebug or your favorite browser's Javascript debugger. This will insert comments to allow you to keep track of the individual source locations in the combined file.
|
||||
|
||||
If you have Java on your web host, you can use the [wrapper for YUI Compressor](https://github.com/mrclay/minify/blob/master/lib/Minify/YUICompressor.php) instead of JSMin. [This thread](http://groups.google.com/group/minify/browse_thread/thread/f12f25f27e1256fe) shows how a user has done this.
|
||||
If you have Java on your web host, you can use the [wrapper for YUI Compressor](../lib/Minify/YUICompressor.php) instead of JSMin. [This thread](http://groups.google.com/group/minify/browse_thread/thread/f12f25f27e1256fe) shows how a user has done this.
|
||||
|
||||
## Javascript isn't being minified
|
||||
|
||||
@@ -48,7 +48,7 @@ Scriptaculous 1.8.2 (and probably all 1.x) has an [autoloader script](http://git
|
||||
|
||||
If you upload files using [Coda or Transmit](http://groups.google.com/group/coda-users/browse_thread/thread/572d2dc315ec02e7/) or from a Windows PC to a non-Windows server, your new files may end up with the wrong `mtime` (timestamp) on the server, confusing the cache system.
|
||||
|
||||
Setting the [$min\_uploaderHoursBehind option](https://github.com/mrclay/minify/blob/master/config.php#L171) in `config.php` can compensate for this.
|
||||
Setting the [$min\_uploaderHoursBehind option](../config.php#L171) in `config.php` can compensate for this.
|
||||
|
||||
WinSCP has a [Daylight Saving Time option](http://winscp.net/eng/docs/ui_login_environment#daylight_saving_time) that can prevent this issue.
|
||||
|
||||
|
@@ -39,7 +39,7 @@ $min_cachePath = new Minify_Cache_WinCache();
|
||||
|
||||
## Closure Compiler API Wrapper
|
||||
|
||||
An [experimental wrapper for Google's closure compiler API](https://github.com/mrclay/minify/blob/master/min/lib/Minify/JS/ClosureCompiler.php) is available for compressing Javascript. If the API fails for any reason, JSMin is used as the default backup minifier.
|
||||
An [experimental wrapper for Google's closure compiler API](../lib/Minify/JS/ClosureCompiler.php) is available for compressing Javascript. If the API fails for any reason, JSMin is used as the default backup minifier.
|
||||
```php
|
||||
$min_serveOptions['minifiers'][Minify::TYPE_JS] = array('Minify_JS_ClosureCompiler', 'minify');
|
||||
```
|
||||
|
@@ -47,7 +47,7 @@ $controller = new Minify_Controller_Files($env, $sourceFactory);
|
||||
|
||||
## Set up service and controller options
|
||||
|
||||
A single array is used for configuring both the behavior of `Minify::serve` (see the [default options](https://github.com/mrclay/minify/blob/master/lib/Minify.php#L73)) and the controller, which has its own option keys.
|
||||
A single array is used for configuring both the behavior of `Minify::serve` (see the [default options](../lib/Minify.php#L73)) and the controller, which has its own option keys.
|
||||
|
||||
The Files controller only needs one key: `files`: the array of sources to be combined and served.
|
||||
|
||||
|
@@ -4,7 +4,7 @@ The simple JSMin algorithm is the most reliable in PHP, but check the [CookBook]
|
||||
|
||||
## How fast is it?
|
||||
|
||||
If you [serve static files](https://github.com/mrclay/minify/blob/master/static/README.md), it's as fast as your web server, and you should do this for high-traffic sites.
|
||||
If you [serve static files](../static/README.md), it's as fast as your web server, and you should do this for high-traffic sites.
|
||||
|
||||
The PHP-based server is not as fast, but still performs well thanks to an internal cache. Tips:
|
||||
|
||||
|
@@ -10,6 +10,7 @@ Clone the project into the `min/` directory inside your document root and instal
|
||||
cd /path/to/public_html
|
||||
git clone https://github.com/mrclay/minify.git min
|
||||
cd min
|
||||
git checkout 3.x
|
||||
composer install --no-dev
|
||||
```
|
||||
|
||||
@@ -36,7 +37,7 @@ cp ${MINIFY}quick-test.css ${MIN}
|
||||
|
||||
Edit `min/index.php` to remove the ``die()`` statement and adjust the `vendor` path as needed.
|
||||
|
||||
**Note:** This does not install the [URL builder](https://github.com/mrclay/minify/blob/master/docs/BuilderApp.wiki.md), but it's not necessary for operation.
|
||||
**Note:** This does not install the [URL builder](BuilderApp.wiki.md), but it's not necessary for operation.
|
||||
|
||||
## Verifing it works
|
||||
|
||||
@@ -56,6 +57,6 @@ Write the [Google Group](http://groups.google.com/group/minify) for help.
|
||||
|
||||
## More links
|
||||
|
||||
* [Usage instructions](https://github.com/mrclay/minify/blob/master/docs/UserGuide.wiki.md)
|
||||
* [Cookbook](https://github.com/mrclay/minify/blob/master/docs/CookBook.wiki.md) for more advanced options
|
||||
* [All docs](https://github.com/mrclay/minify/tree/master/docs)
|
||||
* [Usage instructions](UserGuide.wiki.md)
|
||||
* [Cookbook](CookBook.wiki.md) for more advanced options
|
||||
* [All docs](docs)
|
||||
|
@@ -79,8 +79,6 @@ Browse to http://example.com/min/builder/
|
||||
|
||||
The Minify URI Builder will help you create URIs you can use to minify existing files on your site. You can see screenshots and get a feel for this process from this [walkthrough on mrclay.org](http://mrclay.org/index.php/2008/09/19/minify-21-on-mrclayorg/)
|
||||
|
||||
More info here: https://github.com/mrclay/minify/blob/master/MIN.txt
|
||||
|
||||
You may want to disable the [BuilderApp](BuilderApp.wiki.md) when not in use.
|
||||
|
||||
# Far-future Expires headers
|
||||
@@ -110,9 +108,9 @@ Known issue: files with comment-like strings/regexps can cause problems in this
|
||||
|
||||
# Configuration
|
||||
|
||||
See [config.php](https://github.com/mrclay/minify/blob/master/config.php) for general config options.
|
||||
See [config.php](../config.php) for general config options.
|
||||
|
||||
[groupsConfig.php](https://github.com/mrclay/minify/blob/master/groupsConfig.php) holds preset groups of files to minify. (The builder application can help with this).
|
||||
[groupsConfig.php](../groupsConfig.php) holds preset groups of files to minify. (The builder application can help with this).
|
||||
|
||||
[CookBook](CookBook.wiki.md) shows how to customize settings between production/development environments, and between groups.
|
||||
|
||||
|
Reference in New Issue
Block a user