简体   繁体   English

github.com/jquery/jquery作为git子模块

[英]github.com/jquery/jquery as git submodule

I'd like to use a local copy of jQuery 1.8.3 for my github project. 我想为我的github项目使用jQuery 1.8.3的本地副本。 I'd like to do it the right way, which would be to add it as a submodule: 我想以正确的方式进行操作,即将其添加为子模块:

git submodule add git://github.com/jquery/jquery.git js/lib/jquery

Done! 完成! The problem is the jQuery repository does not have prebuilt versions of jQuery, and other javascript libraries that I'm using do. 问题是jQuery存储库没有jQuery的预构建版本,而我正在使用的其他javascript库却没有。 How should I proceed? 我应该如何进行?

You could build it yourself locally. 您可以自己在本地构建它。 There are some instructions on the GitHub project page. GitHub项目页面上有一些说明

Doing it the right way does not mean adding a submodule. 正确地执行操作并不意味着添加子模块。

You could perfectly use a lightweight .js file or simply use a CDN that will be better for your server. 您可以完美地使用轻量级的.js文件,也可以简单地使用CDN,它对您的服务器更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM