0.0.0 • Published 12 years ago
find-git-repos v0.0.0
find-git-repos
this walks a path or paths, finds all of the git repositories, and their origins
example
callback style
var findrepos = require('find-git-repos');
findrepos('../',function(err,repos){
console.log('all of my repos! ',repos);
});
event emitter style
// with event emitter
var em = findrepos('../../');
em.on('repo',function(repo,remote){
console.log('found repo ',remote,' at ',repo);
});
em.on('end',function(){
console.log('all done!');
})
em.on('error',function(){
console.log('the path i specified must not exist or is in accesible');
});
api
findrepos(path or an array of paths,callback)
- returns EventEmitter finder
- callback(err,repos) repos is an object keyed off of the directory with the remote origin as the values
emitter events repo the repostory info (repo dir, repo remote)
end im done looking no arguments
error if any paths are inaccessable (the error)
0.0.0
12 years ago