@absolunet/git-archive 中文文档教程
@absolunet/git-archive
git archive --remote wrapper
Install
$ npm install @absolunet/git-archive
Usage
const gitArchive = require('@absolunet/git-archive');
gitArchive.download('git@github.com:absolunet/node-git-archive.git').then((dir) => {
console.log(dir);
});
API
download(url [, options])
返回一个 Promise
和下载存档的路径
url
必需
类型:字符串
由 git-archive#remote 指定的回购 url
options.treeish
类型:String
默认值:master
按照 git-archive#tree-ish< /a>
options.format
类型:字符串
默认值:zip
git-archive#format 指定的结果存档格式
options.extract
类型:<代码>布尔值
默认值:true
提取存档
options.path
类型:String
默认值:tmp
存档文件的路径和名称或提取的存档的路径。 如果未指定,将放在临时路径中。
License
麻省理工学院 © Absolunet
@absolunet/git-archive
git archive --remote wrapper
Install
$ npm install @absolunet/git-archive
Usage
const gitArchive = require('@absolunet/git-archive');
gitArchive.download('git@github.com:absolunet/node-git-archive.git').then((dir) => {
console.log(dir);
});
API
download(url [, options])
Returns a Promise
with the path of the downloaded archive
url
Required
Type: String
Repo url as specified by git-archive#remote
options.treeish
Type: String
Default: master
The tree or commit to produce an archive for as specified by git-archive#tree-ish
options.format
Type: String
Default: zip
Format of the resulting archive as specified by git-archive#format
options.extract
Type: Boolean
Default: true
Extract the archive
options.path
Type: String
Default: tmp
Path and name of the archive file or path of the extracted archive. If not specified will be put in a temporary path.
License
MIT © Absolunet
你可能也喜欢
- 4cdl 中文文档教程
- 777-theme-ui 中文文档教程
- @1057405bcltd/compute-orders-addon 中文文档教程
- @2players/generator-nm 中文文档教程
- @42px/custom-errors 中文文档教程
- @__amansingh/websearch 中文文档教程
- @_pearofducks/require-extension-hooks-babel-7 中文文档教程
- @a11ywatch/website-source-builder 中文文档教程
- @abhirupdatta/random_name 中文文档教程
- @aboutbits/pagination 中文文档教程