依赖使用 package.json 中的 git URL 的分支或标签? [英] Depend on a branch or tag using a git URL in a package.json?
本文介绍了依赖使用 package.json 中的 git URL 的分支或标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我已经分叉了一个带有错误修复的节点模块,并且我想在功能分支上使用我的固定版本,直到错误修复被合并和发布.
Say I've forked a node module with a bugfix and I want to use my fixed version, on a feature branch of course, until the bugfix is merged and released.
如何在我的 package.json
的 dependencies
中引用我的固定版本?
How would I reference my fixed version in the dependencies
of my package.json
?
推荐答案
来自 npm 文档:
git://github.com/<user>/<project>.git#<branch>
git://github.com/<user>/<project>.git#feature/<branch>
从 NPM 1.1.65 版开始,您可以这样做:
As of NPM version 1.1.65, you can do this:
<user>/<project>#<branch>
这篇关于依赖使用 package.json 中的 git URL 的分支或标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文