valueflows/vf-ui

Implement build system for framework-agnostic UI components

pospi opened this issue · 3 comments

pospi commented

Pulling this out of #2 to track progress as it's becoming a more complex job than anticipated, so I'd rather break it up piecemeal and do the minimum necessary right now.

MVP of the build system needs to generate a "standard" package (pure WebComponents) as well as a -react version of the library which includes React components generated from a template. We can add more as needed, but I'd be keen for someone to do an Angular version sooner rather than later.

I'm kinda surprised to be finding that this hasn't already been done elsewhere. In what the Svelte docs point you to, you get a Rollup config that generates a bundled app. Then there's the Webpack loader to do the same using its toolchain. But I don't want any of that- I want to "write Svelte once, deploy anywhere" with minimal friction to the end developer. I think the user story is "I can bring vf-ui components into my project of choice, without having to reconfigure my build system or bundler or eject from CRNA". So that means I want:

  • zero-config components written in the native component format of the framework (eg. ReactComponent)
  • pluggable styles that work "natively" (at the framework's module resolution layer)
  • file separation between component DOM logic and styles, to promote re-styling
  • a default export of the component which mixes in a theme that is loaded from another file on top of the "unstyled" component

Most of the way toward making this work. But am suspicious that I'm reinventing the wheel. Might cross-post in Svelte issues...

pospi commented

Also need to generate SSR components separately via the compiler at some point too.

pospi commented

Also to note, I've tried this using Webpack as suggested here, but that just results in verbose Webpack boilerplate cruft that really shouldn't be necessary in these contexts.

We have moved the ValueFlows organization from GitHub to https://lab.allmende.io/valueflows.

This issue has been closed here, and all further discussion on this issue can be done at

https://lab.allmende.io/valueflows/vf-ui/-/issues/5.

If you have not done so, you are very welcome to register at https://lab.allmende.io and join the ValueFlows organization there.