【笔记】download-git-repo学习笔记
前言
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.(Gitlab)
下载依赖
1 | npm install -D download-git-repo |
引入依赖
1 | const download = require("download-git-repo"); |
克隆Git项目
direct::Github需要进行探测#main:指定分支,缺省值为master
1 | download("direct:https://github.com/example/example.git#main", "./", { clone: true }, function (err) {}); |