1
0
mirror of https://github.com/mrclay/minify.git synced 2025-01-17 21:28:14 +01:00
minify/README.md

67 lines
2.3 KiB
Markdown
Raw Normal View History

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.
2015-04-19 23:44:22 -07:00
Wordpress User?
===============
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/)
2015-09-04 17:46:03 -04:00
Unfortunately we can't support the WordPress plugins here.
2015-04-19 23:44:22 -07:00
Installation
============
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
=====================
See the MIN.txt file and the [user guide](https://github.com/mrclay/minify/blob/master/docs/UserGuide.wiki.md)
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:
https://github.com/mrclay/minify/blob/master/docs/BuilderApp.wiki.md
2012-03-15 14:01:14 -04:00
The cookbook also provides some more advanced options for minification:
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).
2015-04-19 23:44:22 -07:00
Unit Testing
============
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
2012-03-10 11:48:32 -05:00
2. To run unit tests, access: http://example.org/min_unit_tests/test_all.php
2015-04-19 23:44:22 -07:00
(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.
2015-04-19 23:44:22 -07:00
File Encodings
==============
2015-04-19 23:44:22 -07:00
Minify *should* work fine with files encoded in UTF-8 or other 8-bit
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.
2015-04-19 23:44:22 -07:00
Leading UTF-8 BOMs are stripped from all sources to prevent
duplication in output files, and files are converted to Unix newlines.