1.0.2 • Published 5 years ago

node-export-dir v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

node-export-dir

Export contents of a given directory

Usage

Require the contents of a directory

// 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.

// otherdir/index.js
// Using optional path
const exportDir = require(`node-export-dir`);
module.exports = exportDir(`${__dirname}/../somedir`);

Example Directory Structure

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

npm test
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

5 years ago