Closed CryZe closed 5 months ago
The layout rendering is already pretty separate from the UI. The only things that are currently shared are:
main.scss
I think we just need to either extract or duplicate each of these components, and then we can separate everything really easily.
Yeah the only hard part is to ensure nothing gets duplicated in the end, and the package works on its own despite using a bunch of non-JS (SCSS, TypeScript, ...)
While it's not a full npm package, the canvas renderer allowed me to essentially host a full LSO in just a few lines in a completely separate codebase, which is essentially what this issue was intended for
livesplit-core should be its own package that just gets imported like any other package. The idea is to make it separate enough that we can publish it to npm whenever we do a new release of livesplit-core. In general I'd like to start modularizing the codebase a bit more, so that we can possibly move the "layout renderer" into its own package as well. This would ensure that all the layout's CSS is properly separated out from the rest of the UI and it allows other experimentation such as a Twitch Extension where you may not want everything.