Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
download-git-repo
Advanced tools
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.
$ npm install download-git-repo
Download a git repository
to a destination
folder with options
, and callback
.
The short hand repository string to download the repository from.
github:owner/name
or simply owner/name
gitlab:owner/name
bitbucket:owner/name
The repository
parameter defaults to the master
branch, but you can specify a branch or tag as a URL fragment like owner/name#my-branch
.
Feel free to submit an issue or pull request for additional host options.
The file path to download the repository to.
An optional options object parameter with download options. Options include:
clone
- boolean default false
- If true use git clone
instead of an http download. While this can be a bit slower, it does allow private repositories to be used if the appropriate SSH keys are setup.The callback function as function(err)
.
Using http download from Github repository at master.
download('zeke/download-github-repo-fixture', 'test/tmp', function(err) {
if (err) return done(err);
done();
});
Using git clone from Bitbucket repository at my-branch.
download('bitbucket:flipxfx/download-bitbucket-repo-fixture#my-branch', 'test/tmp', { clone: true }, function(err) {
if (err) return done(err);
done();
});
To ianstormtaylor/download-github-repo for the head start.
MIT
FAQs
Download and extract a git repository (GitHub, GitLab, Bitbucket) from node.
The npm package download-git-repo receives a total of 77,679 weekly downloads. As such, download-git-repo popularity was classified as popular.
We found that download-git-repo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.