cloned

clones a module at the given revision

cloned

Clone a local or remote git repository at a specific revision. Then do an npm install in it if it has a package.json file.

var cloned = require('cloned');

revision : string - either a path to a repo such as 'git://github.com/brianc/node-cloned@ea1883' or just a sha 'ea1883'. If just given a sha, it will clone the git repo found in process.cwd

callback : function - callback when the repository is cloned err: object - error if there was an error cloning pathToRepository: string - path to cloned repository

var cloned = require('cloned');
 
//clone the current git repository (found at process.cwd) to a specific revision 
cloned('ea1883', function(errdir) {
 
});
 
var cloned = require('cloned');
 
//clone a remote repository at a specific revision 
cloned('https://github.com/brianc/node-cloned@ea18834', function(errdir) {
 
});

MIT