load-repo 
You need to make sure git is in your path, otherwise you can move on
This is a library based on git-clone development
Install
load-repo
npm install load-repo
Api
loadRepo(repo: string): void
loadRepo(repo: string, path?: string): void
loadRepo(repo: string, path?: string, options?: IOptions): void
loadRepo(repo: string, path?: string, callback?: (error?: Error) => void): void
loadRepo(repo: string, path?: string, options?: IOptions, callback?: (error?: Error) => void): void
repo
const repo = 'github:vtrbo/load-repo#main'
path
const path = '/'
options
const options = {
clone: true,
branch: 'main'
}
callback
const callback = (error: Error) => {
if (error)
console.log('download fail')
else
console.log('download success')
}
开源许可证
MIT License © 2022-PRESENT Victor Bo