Open DreadKnight opened 7 years ago
It seems that webcomponents are a nice way to approach this https://en.wikipedia.org/wiki/Web_Components#HTML_Import Not sure if Firefox supports them already (while in draft phase).
Although polymer improves on top of that and makes use of polyfills. https://www.polymer-project.org - We already have a stale branch for migrating the game's UI to it...
HTML import was killed by Firefox, the new defacto standard is to simple use es6 modules and include HTML templates in your js files for now...
The old branch isnt worth continuing, but it's possible we can use a different tool that might attract developers looking for experience.
Vuejs which also supports web components and has a larger community.
Freaking FF, sigh. JS still kinda confuses me overall. Wanted something simple and standard to rewrite the website(s) as well, ditching most of the pointless php. Will look more into this webcomponents/polymer/vue.
Ideally the index.html file will get split when HTML Elements
spec receives mainstream adoption.
Proposal - https://github.com/w3c/webcomponents/issues/645#issuecomment-343601237
Discussion - https://github.com/w3c/webcomponents/issues?q=is%3Aissue+is%3Aopen+html+modules+label%3Amodules
This should probably be on hold until #1624 will be implemented, along with #1616 in order to avoid any merge conflicts.
The
deploy/index.html
should be split into stand alone files that get concatenated on webpack build as it contains too many things inside it, making it kinda hard to deal with. The new files should be in src folder.