如何缩小jquery文件? [英] How to minify jquery files?

查看:163
本文介绍了如何缩小jquery文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jquery,我有一些插件,不提供缩小版本。所以我想采取完整的版本和minfiy它,但所有的网站,我发现你输入你的javascript和它缩小打破插件。

I am using jquery and I got a couple plugins that don't offer a minified version. So I want to take the full version and minfiy it but all the sites I have found that you input your javascript and it minifies it breaks the plugin.

喜欢它因为我得到一个语法错误。

Like it must strip something out because I get a syntax error.

因此,任何人都有一个好的,我可以使用?

So anyone got a good one that I can use?

推荐答案

如果您熟悉Java,还可以使用 YUI压缩器来缩小JS(以及CSS)文件。我们在这里使用它,它的工作伟大。

If you're familiar with Java you could also use YUI compressor to minify JS (and CSS) files yourself. We use it here as well and it works great.

这篇关于如何缩小jquery文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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