find-repositories
v1.0.0
Published
finds all git repositories in a directory
Downloads
3
Readme
find-repositories
About
Find all the git repositories in a directory.
Install
npm install find-repositories
Usage
var findRepositories = require('find-repositories')
var stream = findRepositories(dir)
stream.on('data', function (data) {})
stream.on('end', function () {})
Each data event looks like this:
{
/* filepath to repo */
filepath: '/path/to/repos/example-repo',
/* relname of repo filepath */
relname: 'example-repo',
/* basename of repo filepath */
basename: 'example-repo',
/* array of files in repo */
files: [],
/* object representing state of git repo provided by https://npmjs.com/git-state */
gitState: {
branch: 'master',
ahead: 0,
dirty: 0,
untracked: 0,
stashes: 0
},
/* node stat object */
stat: {
// Stat object. See https://nodejs.org/api/fs.html#fs_class_fs_stats
}
}
Documentation
Contributing
Contributions are welcome! Please read the contributing guidelines first.
Conduct
It's important that this project contributes to a friendly, safe, and welcoming environment for all, particularly for folks that are historically underrepresented in technology. Read this project's code of conduct
Change log
Read about the changes to this project in CHANGELOG.md. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.