BuilderIO / mitosis

Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
https://mitosis.builder.io
MIT License
12.4k stars 549 forks source link

Idea: Mitosis bot to handle generating build changes #466

Open samijaber opened 2 years ago

samijaber commented 2 years ago

Came out of a conversation with @mandx. Writing it here to not lose the idea.

When building a Mitosis project whose outputs are all independent npm packages, there's one issue: every PR with changes in src, but also the same files in output/vue/src, output/svelte/src, output/react-native/src, etc. This makes every PR huge, and unreasonable to easily review. The problem scales with the number of outputs.

One alternative is to .gitignore the output, but that means that consumers of your open-source npm package do not have an easy way to read the final, generated source-code for their framework. Reading Mitosis code might be confusing if they want to see the actual React/Svelte/Vue component and how it works. The only way to do that becomes to install the package locally and inspect their node_modules, which adds a bit of friction.

Copying Armando's answer below, which suggests a mitosis-bot that would create a follow-up PR containing the new built code.

Maybe a bot is the answer:

Followup questions:

kylecordes commented 2 years ago

Another way to handle this: have your source code in a project, have a corresponding -builds project that contains the build output.