Home  >  Article  >  Backend Development  >  git项目引用其他公共库如何管理

git项目引用其他公共库如何管理

WBOY
WBOYOriginal
2016-06-06 20:35:202718browse

现在用 git 管理一个 php 项目,项目下引用了其他开源的 js 类库,但不知道如何管理他们。我尝试过:

1,使用 git clone 下载到php项目对应的js文件夹中,但这样 php项目无法添加该js库中的文件(还是我使用的姿势不对?)。

2,使用类似 gulp 的前端工具 将相应的js文件拷入自己的项目对应的js文件夹。但用起来感觉很繁琐。

不知道有木有其他更好的方案?

回复内容:

现在用 git 管理一个 php 项目,项目下引用了其他开源的 js 类库,但不知道如何管理他们。我尝试过:

1,使用 git clone 下载到php项目对应的js文件夹中,但这样 php项目无法添加该js库中的文件(还是我使用的姿势不对?)。

2,使用类似 gulp 的前端工具 将相应的js文件拷入自己的项目对应的js文件夹。但用起来感觉很繁琐。

不知道有木有其他更好的方案?

git项目引用其他公共库如何管理

不知道你说的是不是这种,
git仓库里直接集成别人的仓库。

比如这里的lib框架就直接调用另一个叫做framework的框架的git地址。。

这个东西叫submodule。。
资料很多

前端依赖bower解决
php依赖composer解决

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn