Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP 5.2.x Asset management library

Is there anything but Assetic (which I cannot use because of PHP version) that can do asset management?

EDIT: This is about web application assets, like javascript and css, a library to manage and minify them for production, be that on the run or with precompiled assets.

like image 275
Draiken Avatar asked Nov 14 '22 20:11

Draiken


1 Answers

Your best bet is probably to backport Assetic to PHP 5.2. The use and namespace statements would need to be replaced with an autoload function and a call to spl_autoload_register().

It looks pretty comprehensive, although it might lack the ability to reference an externally hosted script, like calling jQuery from a CDN.

Personally, I use the Smarty template engine, and some prefilter/postfilter functions to handle stylesheet and javascript includes. A similar trick might be possible in another template system, if you're using one.

like image 140
Terence Johnson Avatar answered Dec 07 '22 22:12

Terence Johnson