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

Create PDS React Component Library Process For NPM Packages #18

Closed
eddiesarevalo opened this issue Aug 10, 2021 · 3 comments
Closed

Create PDS React Component Library Process For NPM Packages #18

eddiesarevalo opened this issue Aug 10, 2021 · 3 comments
Assignees
Labels

Comments

@eddiesarevalo
Copy link
Member

Set up an NPM toolchain that can take react, redux, material-ui, and router then output NPM library files. These files should be ready to be deployed as an NPM package by running a script command such as npm run build-library

The components should be tested to work on other react libraries. This can be done using npm link <library name>

@eddiesarevalo eddiesarevalo self-assigned this Aug 10, 2021
@tloubrieu-jpl
Copy link
Member

@eddiesarevalo is having issues with material-ui integration but is making progresses

@eddiesarevalo
Copy link
Member Author

The material-ui issue was being caused by a known issue during the local testing process. All of the files for the library are copied to the node_modules folder including react. So when npm link is used the consuming application will detect 2 different reacts and crash. The current suggested workaround is to delete react and react-dom from the library build before installing into the consuming application.

@eddiesarevalo
Copy link
Member Author

Added a toolchain to the PDS WDS React repository:
https://github.com/NASA-PDS/pds-wds-react/tree/npm-library-toolchain
This toolchain will take all the components and include them in an installable npm package.

The toolchain works with material-ui, react-redux, and router.

@jordanpadams jordanpadams transferred this issue from NASA-PDS/doi-ui Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants