Skip to content

Conversation

@hertweckhr1
Copy link
Contributor

Description

Copied package-json, ReadMe, ChangeLog, and License into lib folder then published directly from lib folder in order to eliminate lib from the import statement.

We should now be able to import any component with import {<component}> from 'fundamental-react/<component>' instead of import {<component}> from 'fundamental-react/lib/<component>'

I tested on a forked branch to make sure this worked:

  • I was able to import this as import { Button } from 'fundamental-react-hannah/Button';
    image

fixes #399

@netlify
Copy link

netlify bot commented Jun 7, 2019

Deploy preview for fundamental-react ready!

Built with commit ac904b4

https://deploy-preview-573--fundamental-react.netlify.com

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.

This looks great! 🎉

We also need to update the import component to remove lib so that the imports are updated on all the component pages on the documentation site:
https://github.com/SAP/fundamental-react/blob/master/src/_playground/documentation/Import/Import.js#L21

@hertweckhr1 hertweckhr1 changed the title feat: flatten import statement feat: removing lib from import statement Jun 7, 2019
@hertweckhr1 hertweckhr1 requested review from a team and jbadan June 7, 2019 19:25
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 you move the build script I'm happy with this!! 🚢

@hertweckhr1 hertweckhr1 merged commit 52e2614 into master Jun 7, 2019
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.

Consider flattening import statements

3 participants