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

Feat/index file for re export #407

Closed

Conversation

itsOdell
Copy link
Contributor

added an index.ts file within every component folder inside of renderer/src/components for two reasons:

  1. For shorter import paths (e.g import { Backdrop } from ../backdrop instead of import { Backdrop } from ../backdrop/backdrop)
  2. For more power and flexibility. Ability to export multiple files from the same UI component while being modular and reusable while still having a short import path, for example:

Components/
/button
button.css.ts
button.ts
utils.ts
actions.ts
...

This allos us to have a shorter import path along with more flexibility
to import more local files
Every theme.css import that is away by 3 directories (e.g
../../../themes.css) is replaced with a path alias (e.g
@renderer/theme.css)
@piradata
Copy link
Contributor

lgtm

@zamitto zamitto closed this May 30, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants