0.0.4 • Published 5 years ago

@lpenser/git-clone v0.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

@lpenser/git-clone

从git存储库(GitHub,GitLab,Bitbucket)下载代码到指定目录,支持async,await

Installation

npm install @lpenser/git-clone

API

download(repository, destination, options, callback)

Examples

import  download  from '@lpenser/git-clone';
import * as ora  from 'ora';

export default async function downloadTemplate(template, templateDir) {
    const spinner = ora('正在初始化项目').start();
    await download(template, templateDir,{}, async function (err) {
        await  spinner.stop();
        if (err) {
            console.log('Failed to download repo ' + template + ': ' + err.message.trim());
        }
      })
}
0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago