2.0.4 • Published 10 months ago

go-git-it v2.0.4

Weekly downloads
14
License
MIT
Repository
github
Last release
10 months ago

go-git-it npm size workflow

Download any repository or subdirectory on GitHub with support for Node.js and the CLI

npx go-git-it <url> [outputDir]

Use cases

# cwd is ~/mydevspace/

npx go-git-it https://github.com/username/repository
# copied remote content to ~/mydevspace/repository

npx go-git-it https://github.com/username/repository/tree/main/folder
# copied remote content to ~/mydevspace/folder

npx go-git-it https://github.com/username/repository/blob/main/folder/README.md
# copied remote content to ~/mydevspace/README.md

The second command argument is the output directory:

npx go-git-it https://github.com/username/repository path/to/outputDir
# copied remote content to path/to/outputDir/repository

Node interface

go-git-it can also run on a Node.js program.

Installation

npm install go-git-it

Usage

const goGitIt = require('go-git-it')

// Assume cwd is ~/mydevspace/

goGitIt('https://github.com/username/repository')
// copied remote content to ~/mydevspace/repository

goGitIt('https://github.com/username/repository/tree/main/folder')
// copied remote content to ~/mydevspace/folder

goGitIt('https://github.com/username/repository/blob/main/folder/README.md')
// copied remote content to ~/mydevspace/README.md

The second parameter is the output path:

const goGitIt = require('go-git-it')

// Assume cwd is ~/mydevspace/

goGitIt('https://github.com/username/repository', 'path/to/outputDir')
// copied remote content to path/to/outputDir/repository

API

goGitIt(url, outputDir?, text?)

url

Type: string

The URL to the path you want to download. If a folder, will download its content as well.

outputDir

Type: string

Custom path to the outputDir (defaults to the working directory)

text

Type: string

Adds a custom text message instead of default config. This option overrides the success message as well.

License

MIT (c) Cezar Augusto.

2.0.4

10 months ago

1.2.4-1

11 months ago

1.2.4-0

11 months ago

1.2.6

10 months ago

1.2.5

10 months ago

1.2.4

11 months ago

2.0.3

10 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.2.4-2

11 months ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.0

2 years ago

1.0.0

3 years ago

0.5.1-0

3 years ago

0.5.0-0

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.4.0

3 years ago

0.5.1

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.1.0-2

4 years ago

0.1.0-1

4 years ago

0.1.0-0

4 years ago