What problem does it solve?
This Skill automates the creation and maintenance of barrel files (index.ts/tsx), which consolidate exports from a directory. This simplifies import paths, reduces boilerplate, and keeps project structures clean and organized.
Core Features & Use Cases
- Automated Barrel Generation: Creates
index.ts/tsx files for specified directories, re-exporting modules.
- Configurable Generation: Uses
barrel-craft.json to define targets, exclusions, and force-generation for complex structures (e.g., pages, services).
- Clean Import Paths: Transforms deep imports like
from "./services/user/UserService" to from "./services".
- Use Case: "Configure
barrel-craft.json to automatically generate barrel files for all src/features/*/components and src/services directories, excluding test files."
Quick Start
Initialize barrel-craft for your project and generate barrel files for the src directory, including subdirectories.