ecentinela / minifier
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
ea29a2b
minifier /
| name | age | message | |
|---|---|---|---|
| |
README.md | Mon Nov 09 03:15:12 -0800 2009 | |
| |
minifier.php | Fri Oct 09 08:31:10 -0700 2009 | |
| |
minify.php | Fri Oct 09 08:30:33 -0700 2009 | |
| |
yuicompressor.jar | Fri Oct 09 08:22:52 -0700 2009 |
README.md
Problem
- Javascripts and stylesheets are too large because they are not compressed
- Users & your bandwidth is wasted for useless metadata
Solution
- file size reduction (10-97% size reduction)
- combines all files (js+css) from a given folder
Usage
Compress a single javascript or stylesheet file or a whole folder.
Usage:
php minifier.php /public [options]
php minifier.php /stylesheets/common.css [options]
Options are:
-q, --quiet no output
-p, --pretend no changes are made
-r, --recursive execute the action on all subdirectories
-js, --javascripts compress only javascript files
-css, --stylesheets compress only stylesheets files
-c, --combine combines all files in one
Example
php minifier.php /images
minifing /public/common.js
2887 -> 132 = 4%
minifing /public/stylesheets/all.css
3136 -> 282 = 8%
minifing /javascripts/carrousel.js
5045 -> 4 = 0%
...
Author
Javier Martinez Fernandez
ecentinela@gmail.com
