[英]Is it possible to clone the git repositories when installing NPM packages from git?
I have a package.json
like this: 我有一个像这样的package.json
:
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"some-module": "git+ssh://git@github.com/IonicaBizau/some-module.git"
},
"author": "",
"license": "ISC"
}
When I do npm install
everything is installed correctly, but I would like to install the package from my repository by cloning the repository too, so in node_modules/some-module
I will have a git repository cloned from GitHub. 当我执行npm install
所有内容都安装正确,但我也希望通过克隆存储库从我的存储库安装软件包,所以在node_modules/some-module
我将从GitHub克隆一个git存储库。
How can I do that? 我怎样才能做到这一点? Is there a built-in option for that or should I build my own tools? 是否有内置选项或我应该构建自己的工具?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.