themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.78k stars 398 forks source link

[devtool] Improve CI for testing the library #1027

Open rluders opened 9 months ago

rluders commented 9 months ago

Summary

We need to implement a test that will actually test the library after it gets built. So, here goes my idea:

We already have a sample project here, that is the documentation. It uses NextJS. Right now it imports the library from ~/src, instead of doing that we can change it to make the documentation actually import the build version of the library. So, it means that the CI needs to build the library and the docs need to use it.

What are the goals here? Well, first, is that the current way that we are importing doesn't actually test the final built version of the library, and since it shares with the library some configuration files it is hard for us to detect if there is something broken at the final build of the library.

I think that we can use npm link or yarn add or something like that to fix this problem. This will, or should impact the way that we import things inside the documentation, but should keep allowing us to still use the same configuration files without any problem.

💡 I'm open to suggestions here, this is not the final word, but this was the idea that I had to make it simple to test the library using what we already have without having to create anything new.

Context

At 0.6.2 release we had an issue that was passing our CI and our code review 'cause it was hard to detect, this should be mitigated as much as possible.

SutuSebastian commented 3 weeks ago

Does this still stand nowadays with the new monorepo structure where the docs workspace (web) is using the final build of the library workspace (ui)?