问题描述
假设我有一个具有package.json的node.js实用程序模块,如下所示:
{
"name": "myutilitymodule","verion": "0.0.1","license": "MIT","description": "It does stuff","main": "index.js"
}
然后它将通过url和标记(用v0.0.1
标记)在github中提供:
https://github.com/myrepo/myutilitymodule.git#v0.0.1
现在我将此模块引用为另一个项目中的依赖项,
{
"name": "myfancyappalication","description": "A Fancy Application","main": "app.js","dependencies": {
"myutilitymodule": "https://github.com/myrepo/myutilitymodule.git#v0.0.1"
}
}
我想要的是对依赖项的语义版本引用,就像我要引用通过npm发布的软件包一样。
即类似于(注意版本号前的波浪号~
字符)
"dependencies": {
"myutilitymodule": "https://github.com/myrepo/myutilitymodule.git#v~0.0.1"
}
或类似(请注意版本号之前的插入符号^
"dependencies": {
"myutilitymodule": "https://github.com/myrepo/myutilitymodule.git#v^0.0.1"
}
有什么办法可以通过纯git / github标记解决方案实现这种语义版本控制机制?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)