2015-04-19 23:44:22 -07:00
|
|
|
Welcome to Minify!
|
|
|
|
==================
|
|
|
|
|
2015-09-04 17:46:03 -04:00
|
|
|
Minify is an HTTP server for JS and CSS assets. It compresses and combines files
|
|
|
|
and serves it with appropriate headers, allowing conditional GET or long-Expires.
|
2008-08-29 22:56:34 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
Wordpress User?
|
|
|
|
===============
|
2010-07-08 04:25:05 +00:00
|
|
|
|
2015-09-04 17:46:03 -04:00
|
|
|
Use a dedicated WordPress plugin for more deep integration and simpler installation.
|
|
|
|
Here are a couple we're aware of:
|
2015-04-19 23:44:22 -07:00
|
|
|
- [BWP Minify](http://wordpress.org/extend/plugins/bwp-minify/)
|
|
|
|
- [W3 Total Cache](http://wordpress.org/extend/plugins/w3-total-cache/)
|
2010-07-08 04:25:05 +00:00
|
|
|
|
2015-09-04 17:46:03 -04:00
|
|
|
Unfortunately we can't support the WordPress plugins here.
|
2010-07-08 04:25:05 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
Installation
|
|
|
|
============
|
2009-01-26 22:08:27 +00:00
|
|
|
|
2015-09-04 17:46:03 -04:00
|
|
|
Place the `/min/` directory as a child of your DOCUMENT_ROOT
|
|
|
|
directory: i.e. you will have: `/home/example/www/min`
|
2012-03-10 11:48:32 -05:00
|
|
|
|
2012-03-15 11:38:01 -04:00
|
|
|
You can see verify that it is working by visiting these two URLs:
|
2015-04-19 23:44:22 -07:00
|
|
|
- http://example.org/min/?f=min/quick-test.js
|
|
|
|
- http://example.org/min/?f=min/quick-test.css
|
2012-03-15 11:38:01 -04:00
|
|
|
|
|
|
|
If your server supports mod_rewrite, this URL should also work:
|
2015-04-19 23:44:22 -07:00
|
|
|
- http://example.org/min/f=min/quick-test.js
|
2012-03-10 11:48:32 -05:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
Configuration & Usage
|
|
|
|
=====================
|
2009-01-26 22:08:27 +00:00
|
|
|
|
2015-09-04 17:38:45 -04:00
|
|
|
See the MIN.txt file and the [user guide](https://github.com/mrclay/minify/blob/master/docs/UserGuide.wiki.md)
|
2009-01-26 22:08:27 +00:00
|
|
|
|
2012-03-10 11:48:32 -05:00
|
|
|
Minify also comes with a URI Builder application that can help you write URLs
|
2012-03-15 14:01:14 -04:00
|
|
|
for use with Minify or configure groups of files. See here for details:
|
2015-09-04 17:38:45 -04:00
|
|
|
https://github.com/mrclay/minify/blob/master/docs/BuilderApp.wiki.md
|
2008-08-29 22:56:34 +00:00
|
|
|
|
2012-03-15 14:01:14 -04:00
|
|
|
The cookbook also provides some more advanced options for minification:
|
2015-09-04 17:38:45 -04:00
|
|
|
https://github.com/mrclay/minify/blob/master/docs/CookBook.wiki.md
|
2012-03-10 11:48:32 -05:00
|
|
|
|
2015-09-04 17:46:03 -04:00
|
|
|
More [docs are available](https://github.com/mrclay/minify/tree/master/docs).
|
2008-08-29 22:56:34 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
Unit Testing
|
|
|
|
============
|
2008-09-11 20:37:16 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
1. Place the /min_unit_tests/ directory as a child of your DOCUMENT_ROOT
|
2012-03-10 11:48:32 -05:00
|
|
|
directory: i.e. you will have: /home/example/www/min_unit_tests
|
2008-09-11 20:37:16 +00:00
|
|
|
|
2012-03-10 11:48:32 -05:00
|
|
|
2. To run unit tests, access: http://example.org/min_unit_tests/test_all.php
|
2008-09-11 20:37:16 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
(If you wish, the other test_*.php files can be run to test individual
|
2008-09-11 20:37:16 +00:00
|
|
|
components with more verbose output.)
|
|
|
|
|
|
|
|
3. Remove /min_unit_tests/ from your DOCUMENT_ROOT when you are done.
|
|
|
|
|
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
File Encodings
|
|
|
|
==============
|
2008-08-29 22:56:34 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
Minify *should* work fine with files encoded in UTF-8 or other 8-bit
|
2008-09-05 04:22:57 +00:00
|
|
|
encodings like ISO 8859/Windows-1252. By default Minify appends
|
2015-04-19 23:44:22 -07:00
|
|
|
";charset=utf-8" to the Content-Type headers it sends.
|
2008-09-05 04:22:57 +00:00
|
|
|
|
2015-04-19 23:44:22 -07:00
|
|
|
Leading UTF-8 BOMs are stripped from all sources to prevent
|
2008-09-05 04:22:57 +00:00
|
|
|
duplication in output files, and files are converted to Unix newlines.
|