Skip to content

Commit eb7ac1d

Browse files
committed
doc: npm package download-git-repo
1 parent 40143b7 commit eb7ac1d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/start/npm.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sidebarDepth: 0
1010
* [handlebars](https://github.com/wycats/handlebars.js):一个 javascript 语以模版库。
1111
* [metalsmith](https://github.com/segmentio/metalsmith);An extremely simple, pluggable static site generator。
1212
* [chalk](https://github.com/chalk/chalk):Terminal string styling done right。
13-
* [download-git-repo](https://github.com/flipxfx/download-git-repo)
13+
* [download-git-repo](https://github.com/flipxfx/download-git-repo):Download and extract a git repository (GitHub, GitLab, Bitbucket) from node。
1414
* [consolidate](https://github.com/tj/consolidate.js)
1515

1616
下面逐个介绍:
@@ -139,4 +139,18 @@ function plugin(opts){
139139
const chalk = require('chalk');
140140
console.log(chalk.blue('Hello world!'));
141141
```
142-
更多的用法以及 `API` 可查看[详细文档](https://github.com/chalk/chalk)
142+
更多的用法以及 `API` 可查看[详细文档](https://github.com/chalk/chalk)
143+
144+
145+
# download-git-repo
146+
`download-git-repo` 是用于 从 `GitHub`, `GitLab`, `Bitbucket` 下载一个 `git` 仓库,`API` 如下:
147+
``` javascript
148+
download(repository, destination, options, callback)
149+
```
150+
151+
* repository:仓库地址。
152+
* destination:存放下载 git 仓库的路径。
153+
* options:选项,clone。是以 http download 的形式还是 git clone 的形式下载。其中 git clone 的形式支持下载 private 仓库。
154+
* callback:下载完成地回调。
155+
156+
更多例子可查看 [详细文档](https://github.com/flipxfx/download-git-repo)

0 commit comments

Comments
 (0)