# folder-module

> This creates a single module file from a directory of default exports

Latest version **2.0.4** (published 2017-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install folder-module
pnpm add folder-module
yarn add folder-module
bun add folder-module
```

Provides the command `folder-module`.

## 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 | 2.0.4 |
| Published | 2017-11-04 |
| First published | 2017-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | James "The Jamesernator" Browning |
| Maintainers | jamesernator |

## Links

- npm: https://www.npmjs.com/package/folder-module
- Repository: https://github.com/Jamesernator/js-folder-module
- Homepage: https://github.com/Jamesernator/js-folder-module#readme
- Issues: https://github.com/Jamesernator/js-folder-module/issues
- npm.io page: https://npm.io/package/folder-module

## Dependencies (5)

- [colors](https://npm.io/package/colors.md) ^1.1.2
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [babel-core](https://npm.io/package/babel-core.md) ^6.25.0
- [babel-generator](https://npm.io/package/babel-generator.md) ^6.25.0
- [babel-plugin-transform-unicode-property-regex](https://npm.io/package/babel-plugin-transform-unicode-property-regex.md) ^2.0.2

## Recent versions

- 2.0.4 (latest) — 2017-11-04
- 2.0.3 — 2017-08-16
- 2.0.2 — 2017-07-09
- 2.0.1 — 2017-07-09
- 2.0.0 — 2017-07-09
- 1.0.14 — 2017-06-14
- 1.0.13 — 2017-03-28
- 1.0.12 — 2017-03-28
- 1.0.11 — 2017-03-28
- 1.0.10 — 2017-03-28
- 1.0.9 — 2017-03-28
- 1.0.8 — 2017-03-28
- 1.0.7 — 2017-03-13
- 1.0.6 — 2017-03-13
- 1.0.5 — 2017-03-13
- … 5 more at https://npm.io/package/folder-module/versions

## README

# Folder Modules

### Usage

`folder-module <input-directory-name>`

Or specify a file:

`folder-module <input-directory-name> <out-file>`

### Info

folder-module is a tiny utility for turning a folder of default exports into
a single file of exports of the default of each of the individual files within the folder

For example a folder `foo/` with files `a.js`, `b.js` and `default.js` will generate the file `./foo.js`:

```js
export { default as a } from "./foo/a.js"
export { default as b } from "./foo/b.js"
export { default } from "./foo/default.js"
```

You can also specify a filename and paths will be resolved to that filename e.g.
For the above with an out file name `./bar/baz/foo.js` you'll get:

```js
export { default as a } from "../../foo/a.js"
export { default as b } from "../../foo/b.js"
export { default } from "../../foo/default.js"
```

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