https://github.com/pablopunk/find-repos
Nodejs module to recursively find git repos in any folder
https://github.com/pablopunk/find-repos
Last synced: 12 months ago
JSON representation
Nodejs module to recursively find git repos in any folder
- Host: GitHub
- URL: https://github.com/pablopunk/find-repos
- Owner: pablopunk
- Created: 2017-05-27T03:58:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T01:12:06.000Z (about 9 years ago)
- Last Synced: 2024-10-19T08:58:36.583Z (over 1 year ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# find-repos
Node module to recursively find git repos in any folder
## Install
```bash
npm install --save find-repos
```
## Usage
The best feature of `find-repos` against [other alternatives](https://www.npmjs.com/package/find-git-repos) is that `find-repos` works with Promises, so you can use `await` or `then` to call the API:
```javascript
const repos = require('find-repos')
repos({ baseDir: '~', maxDepth: '2', ignores: ['node_modules'] })
.then(console.log)
/* =>
[ '/Users/pablopunk/repos/bashy',
'/Users/pablopunk/repos/dotfiles',
'/Users/pablopunk/repos/find-repos',
'/Users/pablopunk/repos/healthi-app',
'/Users/pablopunk/repos/hyper',
'/Users/pablopunk/www/gmaps', ]
*/
```
## Options
```javascript
{
basePath : 'defaults to ~, sets the root folder for the search',
maxDepth : 'defaults to 3, sets how deep the search gets',
ignores : 'defaults to ["node_modules"], array of paths to ignore (names are wrapped in **)'
}
```
## Contribute
[](https://github.com/feross/standard)
Feel free to open an [issue](https://github.com/pablopunk/find-repos/issues/new) or a [PR](https://github.com/pablopunk/find-repos/compare).
## Related
The cli for this module => [find-repos-cli](https://github.com/pablopunk/find-repos-cli)
## Author
|  |
| ----------------------------------------------------------------------------- |
| © 2017 [Pablo Varela](https://twitter.com/pablopunk) |