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

Example: Clean up barrel imports #1684

Closed
brandonroberts opened this issue Apr 1, 2019 · 15 comments
Closed

Example: Clean up barrel imports #1684

brandonroberts opened this issue Apr 1, 2019 · 15 comments
Labels
Accepting PRs community watch Someone from the community is working this issue/PR Good First Issue Good issue for first-time contributor Project: Example App

Comments

@brandonroberts
Copy link
Member

brandonroberts commented Apr 1, 2019

In multiple places we have individual imports for components, containers, effects.

  • Create an index.ts file in each grouping folder, for example (components/index.ts)
  • Export modules from files in the grouping in the index.ts file, for example (export * from './login-page.component')
  • Update imports in the application to use the barrel imports
@King-i
Copy link
Contributor

King-i commented Apr 1, 2019

i can pick this up?

@brandonroberts brandonroberts added the community watch Someone from the community is working this issue/PR label Apr 1, 2019
@brandonroberts
Copy link
Member Author

Sure

@jtcrowson
Copy link
Contributor

@King-i are you still picking this up?

@alex-okrushko
Copy link
Member

Can we revisit barrel imports? What value do they add in the example app?

@mikezks
Copy link
Contributor

mikezks commented Apr 29, 2019

Some kind of connected to this issue:

What is your opinion on generating an index.ts file with schematics that exports a fromFeature namespace? This would lead to a better IDE experience in components, directives, services, modules that need to import reducers, actions, selectors, state.

I can provide an example repo if you like this idea.

@timdeschryver
Copy link
Member

The auth module has been refactored in #1808, you can use this a reference to refactor the books module.

@alex-okrushko
Copy link
Member

giphy

@jasonhodges
Copy link
Contributor

Is there anyone currently assigned this task? If not, I'd love the opportunity to jump in and help

@timdeschryver
Copy link
Member

You can go ahead and take this one @jasonhodges, or are you currently working on this @King-i ?

@jasonhodges
Copy link
Contributor

You can go ahead and take this one @jasonhodges, or are you currently working on this @King-i ?

Thanks @timdeschryver
Anything that needs to be done to mark this as claimed?

@timdeschryver
Copy link
Member

timdeschryver commented May 7, 2019

No, we already have the community watch as label so we're all good. Maybe just wait 2-3 days before working on this, giving @King-i the opportunity to answer.

@jasonhodges
Copy link
Contributor

jasonhodges commented May 9, 2019

No, we already have the community watch as label so we're all good. Maybe just wait 2-3 days before working on this, giving @King-i the opportunity to answer.

No reply. I should be able to get started on this tomorrow.

jasonhodges pushed a commit to jasonhodges/platform that referenced this issue May 11, 2019
jasonhodges pushed a commit to jasonhodges/platform that referenced this issue May 11, 2019
jasonhodges added a commit to jasonhodges/platform that referenced this issue May 13, 2019
@jasonhodges
Copy link
Contributor

@brandonroberts @timdeschryver are there still other sections I can clean up barrel imports for? Thanks

@brandonroberts
Copy link
Member Author

@jasonhodges I think the only one left is the core folder

@jasonhodges
Copy link
Contributor

@jasonhodges I think the only one left is the core folder

Ok, I’ll take it 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepting PRs community watch Someone from the community is working this issue/PR Good First Issue Good issue for first-time contributor Project: Example App
Projects
None yet
Development

No branches or pull requests

7 participants