# require-dir-lite

> A helper to require one directory

Latest version **1.0.0** (published 2018-06-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install require-dir-lite
pnpm add require-dir-lite
yarn add require-dir-lite
bun add require-dir-lite
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-06-20 |
| First published | 2018-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^8.0.0 |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | derekchuank |
| Maintainers | derekchuank |
| Keywords | require, directory, dir |

## Links

- npm: https://www.npmjs.com/package/require-dir-lite
- Repository: https://github.com/derekchuank/require-dir-lite
- Issues: https://github.com/derekchuank/require-dir-lite/issues
- npm.io page: https://npm.io/package/require-dir-lite

## Recent versions

- 1.0.0 (latest) — 2018-06-20
- 0.0.2 — 2018-06-14
- 0.0.1 — 2018-06-14
- 0.0.0 — 2018-06-14

## README

# Require-dir-lite

[![Build Status](https://travis-ci.org/derekchuank/require-dir-lite.svg?branch=master)](https://travis-ci.org/derekchuank/require-dir-lite)
[![npm version](https://badge.fury.io/js/require-dir-lite.svg)](http://badge.fury.io/js/require-dir-lite)

## Super simple to use

A helper to `require()` one directory recursively with no configuration params.


## Installation

```
npm install require-dir-lite
```

## Usage

There is only one param(default: `'.'`) you would concern: the directory path.

```js
let requireDir = require('require-dir-lite');
let dir = requireDir('./somewhere');
```

Given this directory structure:

```
dir
+ a.js
+ b.json
+ c
  +c-1.js
  +.dumb.js
+ d.txt
```

`requireDir('./dir')` will return the equivalent of:

```js
{
  a: require('./dir/a.js'),
  b: require('./dir/b.json'),
  c: {
    c-1: require('./dir/c/c-1.js')
  }
}
```

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