0.0.3 • Published 4 years ago
down-git v0.0.3
🐙 Down Git
Download directory or file from GitHub.
Install
npm i down-git
# yarn add down-git
# pnpm add down-gitUsage
The following command downloads the directory https://github.com/holazz/down-git/tree/main/src into the ./tmp folder
down-git holazz/down-git/src -b main -o ./tmpUse
down-git --helpfor more information
You can also use it programmatically:
import { download } from 'down-git'
const options = {
route: 'holazz/down-git/src',
branch: 'main',
output: './tmp',
}
download(options).then(
() => console.log('Done!')
)Options
| name | required | description | default |
|---|---|---|---|
route | true | Directory or file path (owner/repo/path) | - |
branch | false | The name of the commit/branch/tag | Repository's default branch (usually main or master) |
output | false | Output directory | process.cwd() |
token | false | Personal access token | - |