☝️ Create an index for a lib directory
Scan directory for nested directories and create an index module
Tree
├── main.js
└── lib
├── index.js
├── module1
│ ├── index.js
│ └── spec.js
└── module2
├── index.js
└── spec.js
lib/index.js
const inedx = ;moduleexports = ;
main.js
const module1 module2 = ;
App with features structure
app.js
├── app.js
├── feature1
│ ├── index.js
│ └── spec.js
└── feature2
├── index.js
└── spec.js
app.js
const inedx = ;const feature1 feature2 = ;
Optional second argument for different structures
const inedx = ;moduleexports = ;