1.0.5 • Published 6 years ago

index-wizard v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Wizzy

Wizard

Simply CLI tool that will recursively create index files in a directory for React components.

Usage

wizzy --d=PATH__TO__YOUR__DIRECTORY

This will crawl your directory and create index.js files with ES6 exports like:

export { default as CamelCaseDirectory } from './camel-case-directory';

Note

  • This follows the convention of directories separated by dashes (-) will translate to a React component using camel casing.

Example

                    bla-bloo-blob-splat -> BlaBlooBlobSplat
  • Your current index.js files are safe. Wizzy will skip over them if they are present

  • This automatically ignores any directories named __tests__

Example

Using wizzy --d=./startDir the following folder structure

.
├── startDir
|   ├── form
|   |   └── form.js
|   |   ├── button
|   |   |   └── button.js
|   ├── input
|   |   └── input.js

will be changed to

.
├── startDir
|   ├── form
|   |   └── form.js
|   |   └── index.js (export { default as Form } from './form)
|   |   ├── button
|   |   |   └── button.js
|   |   |   └── index.js (export { default as Button } from './button)
|   ├── input
|   |   └── input.js
|   |   └── index.js (export { default as Input } from './input)
1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago