admin管理员组文章数量:1357276
I am working on project which is having more than 10 CSS + JS files.
I want to minify/press/obfuscate CSS and JS.
One approach is I can do this manually.
But apart from manual effort is there any function/method available in Zend Framework to achieve this goal?
Thanks in advance!
I am working on project which is having more than 10 CSS + JS files.
I want to minify/press/obfuscate CSS and JS.
One approach is I can do this manually.
But apart from manual effort is there any function/method available in Zend Framework to achieve this goal?
Thanks in advance!
Share Improve this question asked Apr 14, 2011 at 8:51 Jatin DhootJatin Dhoot 4,3649 gold badges42 silver badges59 bronze badges5 Answers
Reset to default 4Try Minify I have used it in several ZF projects. Just install it in /public_html/min it will then minify and press css and javascript on the fly and has a cache feature. On the whole the peformance is very good and the script has a small footprint.
We wrote a shell script that runs all the files through YUI pressor and then bundle them all together. It may look plex initially but it's not. This script ended up being our one-mand-deployment for our app.
This shell does plenty of other thing specific to our backend architecture(git, Erlang,...) so I can't extract this specific part easily. But Yahoo's doc is well done.
As Mic suggest ,its very good to YUI + Shell mand and i can add another suggestion outside of ZF field google pagespeed mod has many filter than can achieve your goals easily
http://code.google./speed/page-speed/docs/filter-js-minify.html
http://code.google./speed/page-speed/docs/filter-css-rewrite.html
Haven't tried it yet, but bundle-phu is probably what you are looking for.
Mic suggestion is nice, but for me it is much easier to use management/build tool like maven.apache (for php) to do this stuff and a much more required automation (for instance testing). And I'm using self written tool for js obfuscation cactus, which can be used as separate console tool as well as maven plugin.
本文标签: javascriptZend Framework CSSJS minifierobfuscatorStack Overflow
版权声明:本文标题:javascript - Zend Framework CSSJS minifier-obfuscator? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744075423a2586657.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论