New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

git-dirs-search

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-dirs-search

[![NPM version](https://badge.fury.io/js/git-dirs-search.svg)](http://badge.fury.io/js/git-dirs-search) [![Build Status](https://travis-ci.org/kfiku/git-dirs-search.svg)](https://travis-ci.org/kfiku/git-dirs-search) [![Dependency Status](https://david-dm.

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

NPM version Build Status Dependency Status Coverage Status

Simple module to find dirs with git repo in

Standard - JavaScript Style Guide

Simple Example

const gitDirsSearch require('git-dirs-search');
// or
import gitDirsSearch from 'git-dirs-search';


gitDirsSearch('/some/path/to/dir', (error, gitDirs) => {
  if(error) {
    throw error
  }

  gitDirs.map(gitDir => {
    console.log(gitDir) // log out directory path (string)
  })

  /**
   * do some think with data
   * example data = [
   *   '/some/path/to/dir/gitRepository1',
   *   '/some/path/to/dir/other/someDir',
   *   '/some/path/to/dir/other/1/2/3/someDir',
   * ]
})

API

gitDirsSearch

gitDirsSearch(dir, callback, options)

Arguments

ArgumentTypeDefaultDescription
dirstring*requiredfull path to dir to search repos in
callbackfunction*requiredstandart node-like callback function
optionsobject{...}options object

Options

OptionKeyDefaultDescription
stepfunctionnullMethod to be executed on single find a git repo
maxDepthnumber6How deep in dirs script will be searching
ignoresarray['node_modules', 'bower_components', 'vendor']Paths to ignore
forceNodebooleanfalseBy default script will use unix tree command if exists in of for performance. You can set this option to true, then script will always use standard node version

Contributing

Im open to contributors :).

Release History

2017-11-09 v1.1.1

  • fix wrong options doc-block

2017-11-09 v1.0.3

  • first stable version

License

Copyright (c) 2014 Grzegorz Klimek
Licensed under the MIT license.

FAQs

Package last updated on 11 May 2018

Related posts