Tag: git submodules

将节点模块检入Git以获取新分支

我使用Node和Grunt来观看文件并编译我的手写笔CSS预处理器代码。 否则节点不是这个项目所必需的。 现在,node_modules文件夹没有被检入到我的git版本库中,这对于发布是很好的。 我遇到的问题是每当我创build一个function分支,node_modules是不存在,我不能看或编译我的手写笔文件。 有没有一种方法可以让node_modules出现在新的分支中,而不必将它们添加到.git中? 我宁愿不在每个新的分支上进行npm安装。 或者,最好的做法是添加node_modules到git? 如果我想将它们添加到git,我应该添加node_modules作为一个git子模块? 如果作为子模块添加,应该指定什么url? 我见过的关于类似情况的最好的讨论就在这里 。

如何在openshift中引用子模块?

我有一个OpenShift帐户,它提供了每个项目的Git仓库。我有一个主项目和两个较小的项目,总共有3个Git仓库。 我刚刚开始使用主项目中的两个较小的项目,并看到git可以使用submodule命令。 我已经将它们添加到自定义目录中,如下所示: git submodule add ssh://…@app.rhcloud.com/~/git/app.git/ git submodule add ssh://…@api.rhcloud.com/~/git/api.git/ 已经产生了如下目录结构: node_modules custom app —— full of tasty files api —— full of tasty files index.js .gitmodules 我有.gitmodules文件 [submodule "custom/api"] path = custom/api url = ssh://…@api.rhcloud.com/~/git/api.git/ [submodule "custom/app"] path = custom/app url = ssh://…@app.rhcloud.com/~/git/app.git/ 这正是我想要的。 这一切都在本地工作。 git add –all git commit -m "new submodules" […]

使用git子模块导致发布时npm包的大小太大

git submodule add会将整个项目添加为包含所有东西,testing等的子模块,这将导致发布包的大小过大。 有什么办法可以克服吗?

处理节点中子模块的本地依赖的最好方法是什么?

在我们的环境中,我们有一个节点应用程序,它依赖于一个也是节点模块的子模块。 我们遇到了使用npm链接的问题,所以我们尝试使用本地依赖(即将package.json中的依赖项的值设置为./path / to / dep)。 这个问题是,当你在子模块中进行更改时,必须对版本进行修改并在父版本中进行更新。 有没有更好的方式来处理这种types的依赖关系,以便我可以在我的子模块中进行更改,并只传播给父项?

咕噜生成和服务相对path不匹配

我有一个典型的目录结构设置我的angular应用程序。 我在应用程序目录中也有一个git子模块: app submod submod.js submod.css bower_components dist node_modules bower.json Gruntfile.js package.json … 我的index.html是为grunt build任务设置的。 一切工作正常,除了子模块文件,因为path导致问题。 如果我把“应用程序”放在path中,构build会正常工作: <!– build:css(.) styles/vendor.css –> <!– bower:css –> <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> <!– … –> <!– endbower –> <link rel="stylesheet" href="app/submod/submod.css" /> <!– endbuild –> 但是,使用grunt serve在本地运行应用程序将不起作用,除非我从path中删除应用程序: <!– build:css(.) styles/vendor.css –> <!– bower:css –> <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> <!– […]