Implement build system for framework-agnostic UI components
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.
- 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...