imjuni / ctix

CLI to generate barrel file for webpack, rollup entrypoint
MIT License
82 stars 22 forks source link

skipEmptyDir doesn't work? #167

Open Samuel-Morgan-Tyghe opened 1 month ago

Samuel-Morgan-Tyghe commented 1 month ago

If i have a parentfolder of childfolders then it should create anindex.ts file on that level?

If this isn't the intended purpose of skipEmptyDir can we add one to make it backwards compatible with create-ts-index.

It's a migration blocker

imjuni commented 3 weeks ago

@Samuel-Morgan-Tyghe Hi,

Can you provide reproducable repo?

Samuel-Morgan-Tyghe commented 3 weeks ago

@imjuni https://codesandbox.io/p/devbox/j3mn67?migrateFrom=y9x7nm

Samuel-Morgan-Tyghe commented 3 weeks ago

In the sandbox i have added "skipEmptyDir":false, which i assume makes an index.ts file for every directory including empty ones.

previous cti would create an index file in both /src/ and /src/components despite not exporting anything from these folders

usecase should be

i should be able to breakdown by folders IE @Src/components = src/components/index.ts that imports/exports src/components/firstcomponent/index.ts +src/components/secondcomponent/index.ts