How to minify jquery files?

前端 未结 7 738
暖寄归人
暖寄归人 2020-12-11 18:06

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 i

相关标签:
7条回答
  • 2020-12-11 18:11

    If you have PHP5 and Zlib on your server, then try this one! http://code.google.com/p/minify/

    I use it to combine jQ, jQ Plug-ins, jQ-UI, and custom site application client-code into a single file.

    I then load that JS file and a small page-specific JS file (with onload, etc) onto each page. It works well...and it also handles CSS.

    I don't leave home without it. (that's just a saying :)

    0 讨论(0)
  • 2020-12-11 18:16

    If you are minfying the plugins as separate files, the process may be renaming a symbol that is part of the jQuery API, because the minifier is not aware of the interaction.

    0 讨论(0)
  • 2020-12-11 18:17

    Javascript Compressor Rater

    I believe it runs the js through rhino and outputs any errors found before hand, and after you can choose the one that works best for you.

    0 讨论(0)
  • 2020-12-11 18:23

    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.

    0 讨论(0)
  • 2020-12-11 18:25

    ASP.net team published a free tool that enables you to improve the performance of your Ajax applications by reducing the size of its JavaScript files. The new tool is named the Microsoft Ajax Minifier. Deatails here: Deatails about Ajax Minifier

    Download it here Download link

    0 讨论(0)
  • 2020-12-11 18:26

    It's likely to be a semicolon issue. I find Microsoft's AjaxMin is a pretty reasonable tool that's easy to customise.

    You might like to check out PackScript - http://danderson00.blogspot.com.au/2013/01/packscript-next-generation-build-for-web.html

    0 讨论(0)
提交回复
热议问题