# node-export-dir

> Export all javascript and json contents of a directory

Latest version **1.0.2** (published 2019-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-export-dir
pnpm add node-export-dir
yarn add node-export-dir
bun add node-export-dir
```

Provides the command `node-export-dir`.

## 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.2 |
| Published | 2019-09-21 |
| First published | 2019-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rahman Malik |
| Maintainers | ara-rockman |
| Keywords | nodejs, require, export |

## Links

- npm: https://www.npmjs.com/package/node-export-dir
- Repository: https://github.com/or9/node-export-dir
- Homepage: https://github.com/or9/node-export-dir#readme
- Issues: https://github.com/or9/node-export-dir/issues
- npm.io page: https://npm.io/package/node-export-dir

## Recent versions

- 1.0.2 (latest) — 2019-09-21
- 1.0.1 — 2019-09-10
- 1.0.0 — 2019-09-10
- 0.0.1 — 2019-09-10

## README

# node-export-dir
Export contents of a given directory

## Usage  

### Require the contents of a directory  
```javascript
// somedir/index.js
const exportDir = require(`node-export-dir`);
module.exports = exportDir();
// or…
module.exports = require(`node-export-dir`)();
```

### Require the contents of another directory  
If you wanted to do this for some reason.  
```javascript
// otherdir/index.js
// Using optional path
const exportDir = require(`node-export-dir`);
module.exports = exportDir(`${__dirname}/../somedir`);
```

### Example Directory Structure  
```bash
tree test
test
├── path0
│   ├── index.js
│   ├── p0file0.js
│   ├── p0file1.json
│   ├── p0file2.json
│   └── p0file3.js
├── path1
│   ├── index.js
│   ├── p1file0.js
│   ├── p1file1.txt
│   ├── p1file2.jpg
│   └── p1file3.md
└── path2
    ├── index.js
    └── p2file0.js
```

## Development  
```bash
npm test
```

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