# export-dirs

> Export directories and their files as node.js modules.

Latest version **0.2.4** (published 2015-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install export-dirs
pnpm add export-dirs
yarn add export-dirs
bun add export-dirs
```

## 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.2.4 |
| Published | 2015-03-18 |
| First published | 2014-11-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | export, exports, file, files, module, modules |

## Links

- npm: https://www.npmjs.com/package/export-dirs
- Repository: https://github.com/jonschlinkert/export-dirs
- Issues: https://github.com/jonschlinkert/export-dirs/issues
- npm.io page: https://npm.io/package/export-dirs

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.2.4 (latest) — 2015-03-18
- 0.2.3 — 2015-03-18
- 0.2.2 — 2015-03-18
- 0.2.1 — 2015-03-18
- 0.2.0 — 2015-03-18
- 0.1.1 — 2014-11-13
- 0.1.0 — 2014-11-13

## README

# export-dirs [![NPM version](https://badge.fury.io/js/export-dirs.svg)](http://badge.fury.io/js/export-dirs)

> Export directories and their files as node.js modules.

## Install with [npm](npmjs.org)

```bash
npm i export-dirs --save
```

## Usage

```js
var dirs = require('export-dirs');
```

**Example output**

When used in combination with [export-files], the files and directories in [fixtures](./fixtures) result in:

```js
// all files and directories are flattened onto the `_` object
{ _:
   { z: [Function],
     y: [Function],
     x: [Function],
     f: [Function],
     e: [Function],
     d: [Function],
     i: [Function],
     h: [Function],
     g: [Function],
     c: [Function],
     b: [Function],
     a: [Function] },
  // files in the same directory as export-dirs
  z: [Function],
  y: [Function],
  x: [Function],
  // folders in the same directory as export-dirs
  two: { f: [Function], e: [Function], d: [Function] },
  three: { i: [Function], h: [Function], g: [Function] },
  one: { c: [Function], b: [Function], a: [Function] } }
```

_(Note that export-dirs does not recurse)_.

## Related projects
* [to-exports](https://github.com/jonschlinkert/to-exports): Create exports from a directory of non-javascript or javascript files.
* [export-files](https://github.com/jonschlinkert/export-files): node.js utility for exporting a directory of files as modules.
* [map-files](https://github.com/jonschlinkert/map-files): Return an object for a glob of files. Pass a `rename` function for the keys, or a `parse` function for the content, allowing it to be used for readable or require-able files.
* [file-reader](https://github.com/jonschlinkert/file-reader): Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.

## Running tests
Install dev dependencies.

```bash
npm i -d && npm test
```

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/export-dirs/issues)

## Author

**Jon Schlinkert**
 
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 

## License
Copyright (c) 2015 Jon Schlinkert  
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 18, 2015._

[export-files]: https://github.com/jonschlinkert/export-files

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