easy-idx
v0.0.4
Published
A TypeScript index file generator that automatically creates and maintains index.ts files for your project.
Readme
Easy-Idx
A TypeScript index file generator that automatically creates and maintains index.ts files for your project.
Features
- Automatically generates index.ts files
- Supports both type and value exports
- Configurable path patterns
- Optional alias support for exports
- Deep directory scanning
Installation
npm install easy-idx
# or
yarn add easy-idxConfiguration
Create an easy-idx.config.json file in your project root:
{
"plugins": [
{
"paths": ["./**/examples/*.ts"],
"alias": null,
"noTypes": false // optional: set to true to skip type exports
}
]
}Configuration Options
paths: Array of glob patterns to scan for TypeScript filesalias: Optional string to transform export names (using mcgill)noTypes: Optional boolean to exclude type exports
Usage
Run in your project directory:
npx easy-idxExample
Given a directory structure:
src/
examples/
user.ts
post.tsEasy-Idx will generate an index.ts file with exports from all matching files:
// Generated by easy-idx
export { User, createUser } from './user';
export { Post, createPost } from './post';
export type { UserType } from './user';
export type { PostType } from './post';License
MIT
