PHP 5.2.x 资产管理库
除了 Assetic (由于 PHP 版本我无法使用)之外,还有什么可以进行资产管理吗?
编辑: 这是关于 Web 应用程序资产,例如 javascript 和 css,这是一个用于管理和缩小它们以用于生产的库,无论是在运行时还是使用预编译的资产。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您最好的选择可能是将 Assetic 向后移植到 PHP 5.2。
use
和namespace
语句需要替换为自动加载函数和对spl_autoload_register()
的调用。它看起来相当全面,尽管它可能缺乏引用外部托管脚本的能力,例如从 CDN 调用 jQuery。
就我个人而言,我使用 Smarty 模板引擎和一些前置过滤器/后置过滤器函数来处理样式表和 javascript 包含。如果您正在使用另一个模板系统,则可能会在另一个模板系统中实现类似的技巧。
Your best bet is probably to backport Assetic to PHP 5.2. The
use
andnamespace
statements would need to be replaced with an autoload function and a call tospl_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.