Symfony2在没有Java或节点的情况下缩小 [英] Symfony2 minify without java or node

查看:90
本文介绍了Symfony2在没有Java或节点的情况下缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无权访问共享主机上的Java或节点.有没有一种方法可以减少服务器端,因此我可以继续使用无资产的资产,而无需这些引擎? Uglify使用node,而yui-compressor(无论如何已弃用)使用Java.

I do not have access to java or node on my shared host. Is there a way to minify server side, so I can continue to use assetic, without these engines? Uglify uses node and yui-compressor (deprecated anyway) uses java.

谢谢!

推荐答案

似乎只有2个使用PHP代码的过滤器:

There seem to be 2 filters using only PHP code:

  • CssMinFilter
  • JSMinPlusFilter

您将需要通过composer安装缩小 php库,然后使用cssminjsminplus资产过滤器

You will need to install the minify php library through composer, and then use the cssmin and jsminplus assetic filters.

这篇关于Symfony2在没有Java或节点的情况下缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆