AssetPackager for CakePHP
Multiple javascript and CSS files simplify things in development, but in production they can begin to adversely affect your page loading times. With AssetPackager for CakePHP, we can have the best of both worlds by allowing multiple files during development and combining and compressing those files for deployment.
Comments
Comment
1 change if using bleeding edge 1.2
Brad
I've used this successfully for quite some time - works great for me. I've started qualifying the newer pre Beta (6025) cake and asset_packager now flags up a warning
Notice (8): Use of undefined constant DEBUG - assumed 'DEBUG' [APP/vendors/asset_packager/asset_helper.php, line 53]
Users on the bleeding edge will need to update the asset packager files with a simple fix....
Comment
2 Underscores and errors if asset config is not there
include($this->jsPath . DS . '_asset_config.php');
and:
include($this->cssPath . DS . '_asset_config.php');
to:
@include($this->jsPath . DS . '_asset_config.php');
and:
@include($this->cssPath . DS . '_asset_config.php');
Also, please not that the shell does _not_ support underscores in the clean function!!!
Comment
3 I may not update my own comment. thats too bad
include($this->jsPath . DS . '_asset_config.php');
and:
include($this->cssPath . DS . '_asset_config.php');
to:
@include($this->jsPath . DS . '_asset_config.php');
and:
@include($this->cssPath . DS . '_asset_config.php');
Also, please not that the shell does _not_ support underscores in the clean function!!!
*** UPDATE ***:
New version here:
http://www.kitara.nl/caketools/AssetPackager_for_CakePHP.zip
Fixed the following:
- New version of jsmin from 1.1.0 to 1.1.1
- Underscore support
- Include errors
Comment
4 Manual
http://www.kitara.nl/caketools/AssetPackager_for_CakePHP.zip
Comment
5 Awesome!
Comment
6 Thank you very much.