romgrk / web-toolkit

A web UI framework based on GTK's Adwaita theme
https://romgrk.github.io/web-toolkit/docs
210 stars 7 forks source link

Split packages #14

Closed odama626 closed 3 years ago

odama626 commented 3 years ago

this is a fast and rough package split using an npm workspace

the packages folder contains

css -> web-toolkit-theme-adwaita
doc -> web-toolkit-docs
react -> web-toolkit-react

these aren't optimal bundles but they do seem to work, within the workspace web-toolkit-docs is relying on web-toolkit-react and web-toolkit-theme-adwaita

fixes https://github.com/romgrk/web-toolkit/issues/7 fixes https://github.com/romgrk/web-toolkit/issues/8

romgrk commented 3 years ago

A few notes:

/package.json has customize-cra and react-app-rewired dependencies, those should be in /packages/react/package.json I think?

What has been extracted in the doc package contains the kitchen sink/demo page. That thing should stay in the react package, it's more of a development chalkboard so I can iterate quickly.

I've been having trouble starting/building the different packages, could you run me through the build/development setup usage?

Also for a user of this project, they'd need to install web-toolkit-react and web-toolkit-theme-adwaita and that's it?

Final note, will you have time to work on this today? If you don't, I'll fix the issues myself if you don't mind. I've been able to find a work project to use as a test case for this framework so I'll finally be able to devote some time to it, but the project is due tomorrow so I'd need it running soon. Thanks :)

odama626 commented 3 years ago

Don't know if this is soon enough, but since it uses an npm workspace you need to use npm 7 and npm install at the root directory as well as install and build in the relevant dependency folders for the particular thing you're working on

romgrk commented 3 years ago

I'll close this one, I used create-react-library that you linked in another issue for the react package and it ended up too different from this one so I did a new PR in #17 . For now I have only splitted react & docs. The css & icons are still to be separated but it will in the future, I just want to have something usable for now.

Also note that I've decided to use pnpm for development, it's better than npm WRT to speed & disk usage. The workspace setup is similar but uses a pnpm-workspace.yaml file instead.