我有一个应用程序,我在执行 npm init
时没有在 package.json
中添加它的存储库。
现在我想在 package.json
文件中添加 repo,但找不到对我有用的解决方案。
此外,我发现存储库 url 的结尾像这样 .git
但我的存储库地址只是这个 https://github.com/sonyzach/usfm-validator
- 如何在我的 package.json 中添加我的 repo url?
- package.json中需要添加哪些格式?
最佳答案
您可以使用任何编辑器打开 package.json 文件并在主对象中添加以下内容
"repository": {
"type": "git",
"url": "https://github.com/sonyzach/usfm-validator.git"
},
另外我认为你应该添加 .git 版本
关于node.js - 如何在 package.json 文件中添加 git repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43780250/