Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support named exports or preset example #26

Open
jakeleboeuf opened this issue Aug 1, 2024 · 0 comments
Open

Support named exports or preset example #26

jakeleboeuf opened this issue Aug 1, 2024 · 0 comments

Comments

@jakeleboeuf
Copy link

I'd love a way to use the barrel preset to output named exports. Is there a configuration or preset I can use to do this?

Example dir structure

project  
│
└───components
│   │   index.ts
│   │   Box.tsx
│   │
│   └───client
│       │   Button.tsx
│       │   ...
Works as expected
/* components/index.ts */

// codegen:start { preset: 'barrel', exclude: './client'}
export * from './Box'
// codegen:end
I want this
/* components/index.ts */

// codegen:start { preset: 'barrel', include: './client/*', export: 'named' }
export { Button, type ButtonProps } from './Button'
// codegen:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant