find-repositories

1.0.0 • Public • Published

find-repositories

npm travis standard conduct

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.

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i find-repositories

Weekly Downloads

2

Version

1.0.0

License

Apache-2.0

Unpacked Size

11.5 kB

Total Files

10

Last publish

Collaborators

  • sethvincent