# require-dot-file

> Recursively walks parent folders looking for a config file

Latest version **0.4.0** (published 2015-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install require-dot-file
pnpm add require-dot-file
yarn add require-dot-file
bun add require-dot-file
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2015-02-20 |
| First published | 2015-01-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jack Lukic |
| Maintainers | jlukic, semantic-bot |

## Links

- npm: https://www.npmjs.com/package/require-dot-file
- Repository: https://github.com/jlukic/require-dot-file
- Homepage: http://github.com/jlukic/require-dot-file/
- Issues: https://github.com/jlukic/require-dot-file/issues
- npm.io page: https://npm.io/package/require-dot-file

## Recent versions

- 0.4.0 (latest) — 2015-02-20
- 0.3.2 — 2015-02-12
- 0.3.1 — 2015-02-05
- 0.3.0 — 2015-02-05
- 0.2.4 — 2015-02-05
- 0.2.3 — 2015-02-02
- 0.2.2 — 2015-01-30
- 0.2.1 — 2015-01-30
- 0.2.0 — 2015-01-29
- 0.1.2 — 2015-01-28
- 0.1.1 — 2015-01-28
- 0.1.0 — 2015-01-28

## README

##  Install

```javascript
npm install require-dot-file
```

## Usage

This is a simple module used for recursively searching across all parent folders for a file to require.

For example you may want to allow a user to [include a dotfile](http://askubuntu.com/questions/94780/what-are-dot-files) to allow users to configure your project that they can include in their project root.

```javascript
var
  requireDotFile = require('require-dot-file')
;

// searches for .myconfig in all parent dir recursively (including current dir)
var config = requireDotFile('.myconfig');

// searches for .myconfig file in /path/to/start and its parent dirs
var config = requireDotFile('.myconfig', '/path/to/start');
```

---
_Source: https://npm.io/package/require-dot-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
