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

Fix: local package import #10

Merged
merged 8 commits into from
Jan 23, 2021
Merged

Fix: local package import #10

merged 8 commits into from
Jan 23, 2021

Conversation

GewoonMaarten
Copy link
Contributor

@GewoonMaarten GewoonMaarten commented Jan 16, 2021

Currently packages are not correctly imported, because they reference a local package which doesn't exist.

In addition I've grouped components that have a close relation to each other. Before you had to import the related packages like this:

import Stepper from  '@gemeente-denhaag/stepper/Stepper'
import Step from  '@gemeente-denhaag/step/Step'
import StepLabel from  '@gemeente-denhaag/steplabel/StepLabel'
import StepContent from  '@gemeente-denhaag/stepcontent/StepContent'

You can now import these packages with:

import Stepper, {
  Step,
  StepLabel,
  StepContent 
} from '@gemeente-denhaag/stepper'

This pull request is related to issue #5.

This will simplify the imports. Instead of
'@gemeente-denhaag/stepper/Stepper' you can do
'@gemeente-denhaag/stepper'
I assumed that components which had dependencies on other components and
did not import them were meant to group them. So I added an export for
every such component.
@GewoonMaarten GewoonMaarten changed the title [Draft] Fix local package import Fix local package import Jan 16, 2021
@GewoonMaarten GewoonMaarten changed the title Fix local package import Fix: local package import Jan 23, 2021
Copy link
Contributor

@DanielvanVliet DanielvanVliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@GewoonMaarten GewoonMaarten self-assigned this Jan 23, 2021
@GewoonMaarten GewoonMaarten linked an issue Jan 23, 2021 that may be closed by this pull request
4 tasks
@GewoonMaarten GewoonMaarten merged commit 7f30d3e into development Jan 23, 2021
@GewoonMaarten GewoonMaarten deleted the fix/npm-packages-#5 branch January 23, 2021 13:53
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.

Make component library available for other projects
3 participants