Package Exports
- git-cloner
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (git-cloner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
git-cloner
Clone multiple git repositories.
☁️ Installation
$ npm i --save git-cloner📋 Example
const gitCloner = require("git-cloner");
gitCloner([
"IonicaBizau/git-stats"
, {
source: "IonicaBizau/node-cobol#1.5.0"
, path: "a/bridge/to/1959"
}
], `${__dirname}/clones`, (err, data) => {
console.log(err || data);
});📝 Documentation
gitCloner(input, options, cb)
Clones the git repositories specified in the input parameter.
Params
Array
input: An array of git sources: git urls (it also supports owner/repo notation, parsed bygit-source), or objects in this format:source(String): The source of the git repository.path(String): The custom folder name/path where the repository should be cloned.Object
options: An object containing the following fields:dest(String): The folder where to clone the repositories (default:".")urlType(String): The git url type (default:"ssh").showOutput(Boolean): Iftrue, the child process output streams will be piped in the main process.done(Function): A function to be called after each repo was cloned.parallelLimit(Number): A number representing the max count of git cloning processes in the same time (default:5).shallow(Boolean): Iftrue, a shallow clone will be created (i.e.--depth=1).Function
cb: The callback function.
😋 How to contribute
Have an idea? Found a bug? See how to contribute.
💫 Where is this library used?
If you are using this library in one of your projects, add it in this list. ✨
git-module-installer—Clone git repositories and install their npm dependencies.