工作中,遇到第三方库不满足需求,需要重写第三方库的情况,这时fork之后,把对应的npm包在package.json中的版本号改成地址自己github的地址:
"dependencies": {
"vue-form-generator": "git+https://github.com/xbb-web/element.git"
}
git://github.com/user/project.git#commit-ish
git+ssh://user@hostname:project.git#commit-ish
git+http://user@hostname/project/...
git+https://user@hostname/project...
The commit-ish can be any tag, sha, or branch which can be supplied as an argument to git checkout. The default is master.