Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
coleturner committed Feb 9, 2018
1 parent 381e063 commit 79df8ee
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# create-index
# create-exports-index

[![NPM version](http://img.shields.io/npm/v/create-index.svg?style=flat-square)](https://www.npmjs.org/package/create-exports-index)

`create-exports-index` program creates (and maintains) ES6 `./index.js` file in target directories that imports and exports sibling files and directories.

## What's different?

`create-exports-index` is a fork of `create-index` that allows you to customize the output that's generated by `write-index`. If you also desire this behavior, please visit the following pull request and leave a comment to have this functionality merged into the main package:
https://github.com/gajus/create-index/pull/43

[![NPM version](http://img.shields.io/npm/v/create-index.svg?style=flat-square)](https://www.npmjs.org/package/create-index)
[![Travis build status](http://img.shields.io/travis/gajus/create-index/master.svg?style=flat-square)](https://travis-ci.org/gajus/create-index)
[![js-canonical-style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)

`create-index` program creates (and maintains) ES6 `./index.js` file in target directories that imports and exports sibling files and directories.

## Example

Expand Down Expand Up @@ -115,6 +120,11 @@ import {
* @returns {boolean}
*/
writeIndex;

writeIndex(['./target_directory'], {}, (varName, fileName) => `export * as ${varName} from './${fileName}`);

// export * as Example from './Example';

```

Note that the `writeIndex` function is synchronous.
Expand Down

0 comments on commit 79df8ee

Please sign in to comment.