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: Publish the package with a lib directory #1119

Merged
merged 3 commits into from
Jul 6, 2020

Conversation

skvale
Copy link
Contributor

@skvale skvale commented Jul 6, 2020

Description

This helps consumers npm link the repo locally.

BREAKING CHANGE: All imports from subdirectories will need to include the lib in their path now.

@skvale skvale self-assigned this Jul 6, 2020
@netlify
Copy link

netlify bot commented Jul 6, 2020

Deploy preview for fundamental-react ready!

Built with commit 8fc5521

https://deploy-preview-1119--fundamental-react.netlify.app

@skvale skvale force-pushed the feat/publish-package-with-lib-dir branch from 896feba to 9240a9d Compare July 6, 2020 13:48
@@ -11,7 +11,7 @@ const Import = () => {
customStyle={{ padding: 10, whiteSpace: 'pre-wrap', fontSize: 14 }}
language='javascript'
style={googlecode}>
{`import { ${groups[groups.length - 1]} } from 'fundamental-react/${groups[1]}';`}
Copy link
Contributor

@jbadan jbadan Jul 6, 2020

Choose a reason for hiding this comment

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

So this isn't your fault, but I just noticed:

import { ButtonSegmented } from 'fundamental-react/lib/ButtonSegmented'; is not correct, it should be import { ButtonSegmented } from 'fundamental-react/lib/Button';

This works for forms because they're inside of a folder in storybook. So we can either make this import component smarter or fix Button to be under a folder by changing https://github.com/SAP/fundamental-react/blob/master/src/Button/__stories__/ButtonSegmented.stories.js#L7 to title: 'Component API/Button/ButtonSegmented' and the same for Button.

I don't think there's any other components that share a folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

import { TabGroup } from 'fundamental-react/lib/TabGroup';

should be

import { TabGroup } from 'fundamental-react/lib/Tabs';

Copy link
Contributor

@jbadan jbadan left a comment

Choose a reason for hiding this comment

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

Once the snapshots are updated 🚢

@skvale
Copy link
Contributor Author

skvale commented Jul 6, 2020

Just to confirm, I should include BREAKING CHANGE: in the commit message for this PR right?

@jbadan
Copy link
Contributor

jbadan commented Jul 6, 2020

@skvale Yeah - the only repo where you can't yet is fundamental-styles (confusing I know)

@skvale skvale merged commit cf39b4a into master Jul 6, 2020
@skvale skvale deleted the feat/publish-package-with-lib-dir branch July 6, 2020 17:58
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.

3 participants