※本文将不再更新,请直接阅读2015年最新版的下载JQuery版
jQuery太常用了,甚至于可以不需要再讨论了,但是ㄚ琪今天回到jQuery官方网站,发现它的下载方式有很多新的说明,让ㄚ琪有一点儿想要翻译出来让大家知道,jQuery又有什么新讯息。
关于程式码
程式码本身写得相当干净,并试着自我说明文件,如果你已经发现一些程式码有可以改善的地方,请随时到Development mailing list讨论,所有的投入都很乐意感激!
所有的程式码以两种方式使用:
- 压缩的(让你可以有较小的档案容量)以及
- 未压缩的(好侦测以及容易了解其神奇的原因)。
如果你有兴趣下载jQuery贡献者开发的外挂,请拜访外挂这一页。
jQuery是根据以下的MIT和GPL许可来提供。
[adsense][/adsense]
CDN Hosted jQuery
一些大型企业在现有的CDN网路上提供jQuery主机托管的备份供大众使用,底下jQuery的CDN-主机托管备份连结是热门的:
- Google Ajax API CDN (也支援透过HTTPS的SSL)
- Microsoft CDN (也支援透过HTTPS的SSL)
- jQuery CDN (透过 Media Temple)
注:ㄚ琪就是喜欢CDN托管的方式,可以稍微减轻网站的载入,虽然应该很早就有了,但还是ㄚ琪第一次注意到这件事,所以值得翻译分享。
下载jQuery
这是你应用程式建议使用的jQuery版本,这里的程式码是稳定的而且可以在所有现代的浏览器使用。
简化的版本,比被包装的版本档案容量还大(注意:被包装的版本不使用在现行的版本中),通常是使用在产品布署时最好的版本,被包装的版本需要不少的客户端处理时间来解压缩程式码而简化的板本不需要,jQuery的包装版本的下载时间不会比简化版本或是未压缩的版本多;然而,每次函式库载入时(第一次使用或是浏览器暂存的使用)它都需要解压缩而这会造成任何jQuery程式码每一次执行时的载入需要不少的延迟。
现行的版本
过去的版本
- 1.7 (Release Notes)
Minified, Uncompressed - 1.6.4 (Release Notes)
Minified, Uncompressed - 1.6.3 (Release Notes)
Minified, Uncompressed - 1.6.2 (Release Notes)
Minified, Uncompressed - 1.6.1 (Release Notes)
Minified, Uncompressed - 1.6 (Release Notes)
Minified, Uncompressed - 1.5.2 (Release Notes)
Minified, Uncompressed - 1.5.1 (Release Notes)
Minified, Uncompressed
Documentation: Changelog - 1.5 (Release Notes)
Minified, Uncompressed
Documentation: Changelog - 1.4.4 (Release Notes)
Minified, Uncompressed
Documentation: Changelog - 1.4.3 (Release Notes)
Minified, Uncompressed
Documentation: Changelog - 1.4.2 (Release Notes)
Minified, Uncompressed
Documentation: Changelog - 1.4.1 (Release Notes)
Minified, Uncompressed
Documentation: Changelog, Visual Studio - 1.4 (Release Notes)
Minified, Uncompressed
Google’s AJAX Library API/CDN: Minified
Documentation: Changelog - 1.3.2 (Release Notes)
Minified, Uncompressed
Google’s AJAX Library API/CDN: Minified
Documentation: Visual Studio - 1.3.1 (Release Notes)
Minified, Uncompressed
Documentation: Visual Studio - 1.3 (Release Notes)
Minified, Uncompressed
Documentation: Changelog, Visual Studio - 1.2.6 (Release Notes)
Minified, Packed, Uncompressed
Documentation: Visual Studio - 1.2.5 (Release Notes)
Minified, Packed, Uncompressed - 1.2.4 (Release Notes)
Minified, Packed, Uncompressed - 1.2.3 (Release Notes)
Minified, Packed, Uncompressed - 1.2.2 (Release Notes)
Minified, Packed, Uncompressed - 1.2.1 (Release Notes)
Minified, Packed, Uncompressed - 1.2 (Release Notes)
Minified, Packed, Uncompressed - 1.1.4
Compressed, Uncompressed - 1.1.3.1
Compressed, Uncompressed - 1.1.3
Compressed, Uncompressed - 1.1.2
Compressed, Uncompressed - 1.1.1
Compressed, Uncompressed - 1.1
Compressed, Uncompressed - 1.0.4
Compressed, Uncompressed - 1.0.3
Compressed, Uncompressed - 1.0.2
Compressed, Uncompressed - 1.0.1
Compressed, Uncompressed - 1.0
Compressed
jQuery Git – 一种未完成作品即时的建置测试
这种未完成作品的建置(也叫做jQuery Git)是从jQuery Git repositoryi每分钟产生一次的,它提供给想要帮助测试下个版本jQuery的人一个方便。
当要报告jQuery未完成品建置问题时,请确认你有包含日期的截图产生(要列在档案的前面)。
不建议从CDN连结到WIP建置目录,因为档案一直在更新,而且在新的提交到档案库时会每分钟改变。
警告:不要使用jQuery Git在产品系统或现场应用中!它没有测试过,也不稳定,它可能会意外地炸毁你,你已经被警告了!假如有疑问,请停止并使用现行版本。
- jquery-git.js – Uncompressed, work-in-progress build
从Git来建置
注意:下面是相当先进的,假如你只想使用较新版本的jQuery,请试试未完成品建置。
所有原始码保存在Git版本控制下,你可以线上浏览,假如你只想下载一部分的jQuery程式码,每个档案或目录都有下载连结可以使用。
假如你可以存取Git,你可以连线到这里的档案库:
git clone git://github.com/jquery/jquery.git
你也可以从GitHub检查出一个特定的jQuery版本在:
git clone git://github.com/jquery/jquery.git git checkout <version> e.g. git checkout 1.2.6
假如你想从Git档案库建构你自己的jQuery备份,你会需要建构它。
注意:jQuery UI程式码在它自己的Git档案库中:
git clone git://github.com/jquery/jquery-ui.git
※想了解git如何使用吗?请参阅读版本控制使用git
建置需求
jQuery目前需要下列的部份来安装:
- 一个建置系统(不是
make就是
ant):
- make: 在很多的Unix-基础的系统上有(Unix, BSD, OSX, Cygwin)
- ant: 在任何有JDK跟ANT安装的平台上都会有
- java: Java的拷贝,1.6.0或以上的版本(需要来建构jQuery简化版本)。
建置程序
现在你会需要使用前面你选择的建置系统 – 不是make
就是ant。
假如你是使用:
- 要建构jQuery:
make
- 这样会产生jquery.js以及jquery.min.js在dist目录中
假如你是使用ant:
- 要建构jQuery:
ant
- 这样会产生jquery.js以及jquery.min.js在dist目录中
看来jQuery越来越强壮了,竟然要用到make或ant来建置,佩服!
12条评论
Comments are closed.