Pack and compress all files
|
|
Is there a way to pack into one compressed file all prototypeJS, scriptaculous and prototype-ui? |
|
|
The easy way would be merging the files in this order and using a js packer. You also could load the scripts on the server and put them together and use a packer (like http://code.google.com/p/jsmin-php/ for php) |
|
|
For the one using Ruby on Rails I would recommend asset_packager It merge and minify files in production while keeping them separated for development to provide easy debugging. |
|
|
On Rails 2 you could just use the :cache option on stylesheet_link_tag or javascript_include_tag. |
|
|
Sure that’s great for merging them all together but asset_packager also minify them so brings the weight even lower. if I remember well even if you use gzip after it. |
|
|
The :cache option seems to be missing a compressor – that should be fixed in a future release of rails. |
|
|
Right, would be good to have rails supporting compression for cached files. If you can get the CSS cache issue regarding relative linked image as well that would be simply fantastic. Hope to see you posting the patch to be included in 2.1 ;-) |
|
|
i think it would be more a rails 2.2 push ;) i think until then i would build a plugin should be a possible task as i have it already got solved in php. the only problem is that i still got no solution for the cloning problem and neither for the time compression, so i could not say when that would be done :) |
|
|
Did you check asset_packager ? (Link above) |
|
|
i used it in a rails 1.2 projekt – but i’m didn’t need a css url rewrite there. So I’m not sure if that would be done by asset_packager. But I think I would use it as base or at least inspiration for an own packager in rails. One thing i don’t like about asset_packager is the needed rake for creating the packed assets. I more like the way rails 2 does the task transparently. |